Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46288

Re: Making safe file names

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.085
X-Spam-Evidence '*H*': 0.83; '*S*': 0.00; 'win32': 0.03; 'subject:file': 0.07; 'python': 0.11; 'windows': 0.15; 'forbid': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'applies': 0.16; 'wrote:': 0.18; 'bit': 0.19; '>>>': 0.22; '(in': 0.22; 'holds': 0.26; 'van': 0.27; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; '"",': 0.31; 'names.': 0.31; 'sep': 0.31; 'file': 0.32; '(most': 0.33; 'device': 0.34; 'trouble': 0.34; 'test': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'url:support': 0.36; 'operating': 0.37; 'url:microsoft': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'skip:o 30': 0.61; 'name': 0.63; 'such': 0.63; 'more': 0.64; 'god': 0.65; 'article': 0.77; '11:44': 0.84; 'directory:': 0.84; 'subject:Making': 0.84; 'albert': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=83yGZHnGmDim2wpzp1QTGLFguKR1Ee4PYit/QvAqPGM=; b=lRWdTEtmP5RUNQ6iHtlQIIX3loUXzasP7NOP6Ncqtsq5I99Bv25L99IUPe6UA2nRQl xHwbUVNOojOYZ1pr7qS7nejQY9/aw7GsJvku/5fMPd/4l6nrhZTNsBXbvJDabNuaa62k PdI8Zp7fGLNcsvLFcf5zbsXC9+aj0r3g7rLFVyEax9q6HlRGeWbr+PVNja9qlF21Ih1c lSYmJjh6oOYRN/E45xvndDEmTJjpEta9fZQmegkluThxDNFcG2P0wTxVSC4Mlao8I9re FZs+BJpbJVfXmnzYF+jO2b4Piz8l96rF/zQQyNzt2AMVSiAotToMGOb0OHi+g1WGMJYH 226A==
MIME-Version 1.0
X-Received by 10.58.208.228 with SMTP id mh4mr17961368vec.23.1369749183939; Tue, 28 May 2013 06:53:03 -0700 (PDT)
In-Reply-To <51a4b4aa$0$6063$e4fe514c@dreader36.news.xs4all.nl>
References <51895D03.4000300@gmail.com> <518998FE.6030805@davea.name> <mailman.1430.1367974288.3114.python-list@python.org> <Lvydneajg7LXNhTMnZ2dnUVZ_rKdnZ2d@westnet.com.au> <51a4b4aa$0$6063$e4fe514c@dreader36.news.xs4all.nl>
Date Tue, 28 May 2013 23:53:03 +1000
Subject Re: Making safe file names
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2297.1369749186.3114.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369749186 news.xs4all.nl 15868 [2001:888:2000:d::a6]:45765
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46288

Show key headers only | View raw


On Tue, May 28, 2013 at 11:44 PM, Albert van der Horst
<albert@spenarnc.xs4all.nl> wrote:
> In article <Lvydneajg7LXNhTMnZ2dnUVZ_rKdnZ2d@westnet.com.au>,
> Neil Hodgson  <nhodgson@iinet.net.au> wrote:
>>    There's also the Windows device name hole. There may be trouble with
>>artists named 'COM4', 'CLOCK$', 'Con', or similar.
>>
>>http://support.microsoft.com/kb/74496
>
> That applies to MS-DOS names. God forbid that this still holds on more modern
> Microsoft operating systems?

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> open("com1","w").write("Test\n")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'com1'
>>> open("con","w").write("Test\n")
Test
5
>>>

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 19:51 -0500
  Re: Making safe file names Neil Hodgson <nhodgson@iinet.net.au> - 2013-05-08 11:28 +1000
    Re: Making safe file names Dave Angel <davea@davea.name> - 2013-05-07 21:45 -0400
      Re: Making safe file names Roy Smith <roy@panix.com> - 2013-05-07 22:21 -0400
    Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 21:20 -0500
    Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 21:06 -0500
    Re: Making safe file names Dave Angel <davea@davea.name> - 2013-05-08 00:10 -0400
    Re: Making safe file names albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-05-28 13:44 +0000
      Re: Making safe file names Chris Angelico <rosuav@gmail.com> - 2013-05-28 23:53 +1000
      Re: Making safe file names Grant Edwards <invalid@invalid.invalid> - 2013-05-28 16:03 +0000
  Re: Making safe file names Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-08 03:40 +0000
    Re: Making safe file names Dave Angel <davea@davea.name> - 2013-05-08 00:13 -0400
      Re: Making safe file names Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-08 04:47 +0000
    Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 23:49 -0500

csiph-web