Silly redirect error.
Arne Weise
yoghurtbrain at hotmail.com
Fri Jan 11 11:47:03 EST 2002
Howdy strangers. I have this simple code in error.py:
import os
def main():
return os.system("echo spam")
main()
If I try to redirect the output, som error occurs and the expected
text is not in output.txt.
error.py > output.txt
"The handle is invalid."
(translated from swedish win2000 "Referensen (handle) är felaktig." )
If I change it to:
return os.system("dir")
then I get the error:
"There is not enough space on the disk." (also translated)
This makes no sense as there is 8 gigs free diskspace.
Also, the same code in c++ works just fine.
Im using python 2.2 btw.
More information about the Python-list
mailing list