1. PyPA
  2. Python Packaging Authority Projects
  3. pylauncher
  4. Issues
Issue #16 invalid

Redirecting on cmd prompt yields error

created an issue

== When running a small testscript on the command line redirecting stdout an error occurs: ==



import sys print "Print always." if sys.stdout.isatty(): print "Print only on tty!" }}}

testtty.py > testout.txt

close failed in file object destructor:

Error in sys.excepthook:

Original exception was:

== Using python directly works: ==

c:\Python26\python.exe testtty.py > testout.txt

Comments (6)

  1. Log in to comment