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


Groups > comp.lang.python > #46288

Re: Making safe file names

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 2013-05-28 23:53 +1000
Subject Re: Making safe file names
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2297.1369749186.3114.python-list@python.org> (permalink)

Show all headers | 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