[Tutor] nul file in Windows
Timo List
timomlists at gmail.com
Sun Nov 15 13:39:00 CET 2009
For my program I disable the py2exe log feature by routing output to the
nul-file.
Code:
if win32 and py2exe:
sys.stdout = open("nul", "w")
sys.stderr = open("nul", "w")
This always worked fine.
Today, I received an email from a user with the following error:
IOError: [Errno 2] No such file or directory: 'nul'
Now, I thought the nul-file always existed, shouldn't it?
Is there another way to disable output, if this one fails?
Cheers,
Timo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091115/0e4be0e1/attachment.htm>
More information about the Tutor
mailing list