[issue9390] Error in sys.excepthook on windows when redirecting output of the script
sorin
report at bugs.python.org
Tue Jul 27 14:51:29 CEST 2010
New submission from sorin <sorin.sbarnea at gmail.com>:
create a test.py with this content:
print("test")
run this file from command line by redirecting the output:
test.py >out.log
You get:
----
close failed in file object destructor:
Error in sys.excepthook:
Original exception was:
----
This does not happen if you call the script by using "python test.py >out.log"
Also this does not reproduce with Python 3.1 but it does reproduce with latest Python 2.6 and 2.7 under windows.
You can switch the registered python interpreter via registry key:
[HKEY_CLASSES_ROOT\Python.File\shell\open\command]
@="\"C:\\lib\\Python27\\python.exe\" \"%1\" %*"
----------
components: Windows
messages: 111695
nosy: sorin
priority: normal
severity: normal
status: open
title: Error in sys.excepthook on windows when redirecting output of the script
type: crash
versions: Python 2.6, Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9390>
_______________________________________
More information about the Python-bugs-list
mailing list