Re: Windows users please test this for me

Blake Winton <blake-dlUKtbW3TlBcVw/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
>>>f = open("NUL","a")
>>>f.write("whatever")
>>>f.flush()
>>It didn't create a file, as far as I can tell. I assume that's the
>>behavior you wanted? Is NUL a reserved word?
> Windows ==> NUL
> *nix ==> /dev/null

As a side note, Windows will also ignore case, extensions, and even path 
for the Nul file, so:
echo "Foo" > Nul.exe
won't create a file, and if you have a file called "nul.html", say from 
a Unix archive, you won't be able to correctly expand it.  (See 
http://www.oreilly.com/catalog/jpower/bugfixes/ for someone who's been 
bit by this.)

Later,
Blake.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.