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 scott at scottdial.com scodial at cs.indiana.edu
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4