Fred Drake wrote:
> It's special, but in a different way. /dev/null really exists in the
> Unix filesystem; "nul" is more magical than that.
>
> What's more, it has peers: "prn", "com1" and others like that.
>
For the record, the fixed names 'aux', 'con', 'nul', and 'prn' along
with the set of 'com[0-9]' and 'lpt[0-9]' names that are reserved. And
for that matter, any of those with an extension is reserved as well.
These files always exist as far as I am concerned (where existence is
defined by your ability to open() them).
def is_special_on_win32(name):
import os.path, re
name = os.path.basename(name)
return (re.match('(nul|prn|aux|con|com[0-9]|lpt[0-9])(\..*)?$',
name) is not None)
--
Scott Dial
[EMAIL PROTECTED]
[EMAIL PROTECTED]
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com