This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients amaury.forgeotdarc, christian.heimes, gvanrossum
Date 2007-11-11.17:48:42
SpamBayes Score 0.0004502256
Marked as misclassified No
Message-id <47374074.7020901@cheimes.de>
In-reply-to <ca471dc20711110937j7133c521w57f9066d91072085@mail.gmail.com>
Content
Guido van Rossum wrote:
> Hmm... In internal_close() there's still a test for self->fd >= 0. I'm
> not sure if this is an oversight or intentional.

I'll check it later.

The patch still contains some debugging code that redirects stdout and
stderr to a file when PY_STDERR_FILE is defined.

> Also, I don't understand under what circumstances fds < 0 can occur. I
> presume this is only on Windows. Can you point me to docs for this
> fact?

It happens when a script is run with pythonw.exe (pyw extension).
PythonW.exe isn't a console application but a GUI app which doesn't
create a console window. However GUI apps don't have valid standard
streams because stdin, stdout and stderr aren't connected.

Here are some links that shed some light on the problem:

http://mail.python.org/pipermail/python-dev/2001-January/011423.html
http://www.halcyon.com/~ast/dload/guicon.htm
http://msdn2.microsoft.com/en-us/library/3x292kth(VS.80).aspx

The patch creates another problem:
http://bugs.python.org/issue1422

Christian
History
Date User Action Args
2007-11-11 17:48:43christian.heimessetspambayes_score: 0.000450226 -> 0.0004502256
recipients: + christian.heimes, gvanrossum, amaury.forgeotdarc
2007-11-11 17:48:43christian.heimeslinkissue1415 messages
2007-11-11 17:48:42christian.heimescreate