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: 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> <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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Tue, May 28, 2013 at 11:44 PM, Albert van der Horst wrote: > In article , > Neil Hodgson 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 "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'com1' >>> open("con","w").write("Test\n") Test 5 >>> ChrisA