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.000450226
Marked as misclassified No
Message-id <>
In-reply-to <>
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:

The patch creates another problem:

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