[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2014-07-16 Thread Zachary Ware

Zachary Ware added the comment:

This appears to me to be a well-documented Windows bug with a clear, documented 
fix, and I am not able to reproduce it so I'm not sure if it's even still 
relevant.  Closing the issue.

--
resolution:  - third party
stage:  - resolved
status: open - closed
versions:  -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2014-07-15 Thread Mark Lawrence

Mark Lawrence added the comment:

I can't reproduce this with 3.4.1 or 3.5.0a0.  I don't have a 2.7.x to test on, 
can it still be reproduced with later versions of 2.7?  Does the introduction 
of pylauncher impact all on this wrt registry keys?

--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-27 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I've seen the same question/answer on other forums, about Perl, Lua and 
Javascript 
http://stackoverflow.com/questions/3018848/cannot-run-python-script-on-windows-with-output-redirected
but nobody suggested to set this flag by default. I don't know if it can have 
unwanted effects.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This post: 
http://stackoverflow.com/questions/3018848/cannot-run-python-script-on-windows-with-output-redirected
suggests that there is a difference between python test.py  out.log and 
test.py  out.log.
It also suggests a change in the registry that fixed the problem for me some 
months ago. Can you try it?

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

@Amaury - That sounds exactly like the issue described.

To summarize the error is caused because in some versions of windows there is a 
bug that causes the handles to stdin/stdout to not be inherited correctly for 
apps run from the console via file association.

This is the kb article, http://support.microsoft.com/default.aspx?kbid=321788

In fact looks like this issue was discussed in the Python mailing list in 2004 
as well, see 
http://mail.python.org/pipermail/python-bugs-list/2004-August/024923.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Michal Molhanec

Michal Molhanec molha...@gmail.com added the comment:

Thanks, the fix looks working.
The questions are:
a) can this situation be detected at runtime to provide better error message?
b) can it be detected during the installation so that the installation program 
can offer to the user to set the flag (or it could be set always? are there any 
disadvantages in doing so?}

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

I was not able to reproduce this on Python 2.7 x64 or Python 3.2 x64 on Win 7 
SP1.

I am curious what the output is if you just run test.py, do you still get an 
error?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-25 Thread Michal Molhanec

Michal Molhanec molha...@gmail.com added the comment:

Running it without redirecting output, like
c:\p\test.py
works OK

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-05 Thread Michal Molhanec

Michal Molhanec molha...@gmail.com added the comment:

I've got the same problem with 2.7.1 (both 32bit and 64bit versions) under W7 
SP1 64bit. Under WXP SP3 32bit it works OK. What's worse the output file is 
empty.

3.2 (tested 64bit version) behaves even worse -- it does not print the error 
like 2.7 but the resulting file is empty as well!

--
nosy: +Michal.Molhanec

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-05 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2010-07-27 Thread sorin

New submission from sorin sorin.sbar...@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 rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com