On Thu, 15 Feb 2007 10:13:17 -0300, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >En Thu, 15 Feb 2007 03:34:59 -0300, John Machin <[EMAIL PROTECTED]> >escribió: > >> On Feb 15, 4:03 pm, [EMAIL PROTECTED] wrote: >>> Is there any way I can create an "AUX.csv" file without the error? >> >> Probably not. AUX, CON, NUL, PRN, LPT, COM1, COM2 etc (with or without >> an extension) are reserved in Windows for specific devices for >> compatibility with MS-DOS 1.00 programs, which did that for >> compatibility with CP/M. > >(This is OT now) Do you know why "AUX.csv" is invalid too? I can accept >that AUX (without extension) is an invalid filename, but it is quite >different from "AUX.csv" >
Many programs unconditionally add an extension to a filename received from user input or elsewhere. To "simplify" dealing with files, the open call accounts for this case, assuming that the program did not really want to open a file on disk, but that it just accidentally added an extension where one was not really necessary. There /is/ a way to open an on-disk file named "AUX" or "AUX.csv", but it requires special spelling. I don't remember the details at present, but presumably if you are interested you can dig it up on MSDN. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list