Stderr and Pythonw

V

vm_usenet

Hi everyone,

I've seen this subject come up in another thread, but not getting
enough attention - so I'll just ask it:
When running python code via pythonw, what exactly happens to stderr?
I tried running code that, among else, writes to stderr - and at some
point I get an IOError claiming "Bad file descriptor".

Why is this happending?

Thanks in advance,

vm
 
D

Dennis Lee Bieber

When running python code via pythonw, what exactly happens to stderr?

You aren't invoking programs by typing "pythonw program.py" in a
command console window, are you?

pythonw was intended to be used for programs activated by
clicking on icons in Windows. As such, these programs are presumed to
have NO CONSOLE I/O, all I/O must be handled by the program creating a
window (GUI) or file and writing to that.

Since there is no console expected, none of the std***
connections are created.

--
 
M

Manlio Perillo

You aren't invoking programs by typing "pythonw program.py" in a
command console window, are you?

pythonw was intended to be used for programs activated by
clicking on icons in Windows. As such, these programs are presumed to
have NO CONSOLE I/O, all I/O must be handled by the program creating a
window (GUI) or file and writing to that.

Since there is no console expected, none of the std***
connections are created.

This not really corrected.
Actually 'some' std*** connections are created but are usefulness
(and moreover they have a bug).

If you write more than 4096 an exception is raised...


Regards Manlio Perillo
 
P

Peter Hansen

Manlio said:
This not really corrected.
Actually 'some' std*** connections are created but are usefulness
(and moreover they have a bug).

If you write more than 4096 an exception is raised...

And, for future reference, here is the bug report Manlio filed
on SourceForge (for which there is no response yet):

http://sourceforge.net/tracker/index.php?func=detail&aid=973507&group_id=5470&atid=105470

I've also confirmed this, using a test script very similar to one
Tim Peters posted a couple of months ago in
http://groups.google.ca/[email protected]

The problem is confirmed to still exist with Python 2.3.4.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,661
Latest member
FloridaHan

Latest Threads

Top