473,218 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

Stderr and Pythonw

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
Jul 18 '05 #1
3 2159
On 29 Jun 2004 12:25:58 -0700, vm*******@yahoo.com (vm_usenet) declaimed
the following in comp.lang.python:
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.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #2
On Wed, 30 Jun 2004 04:22:16 GMT, Dennis Lee Bieber
<wl*****@ix.netcom.com> wrote:
On 29 Jun 2004 12:25:58 -0700, vm*******@yahoo.com (vm_usenet) declaimed
the following in comp.lang.python:
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.


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
Jul 18 '05 #3
Manlio Perillo wrote:
On Wed, 30 Jun 2004 04:22:16 GMT, Dennis Lee Bieber
<wl*****@ix.netcom.com> wrote:
On 29 Jun 2004 12:25:58 -0700, vm*******@yahoo.com (vm_usenet) declaimed
the following in comp.lang.python:
When running python code via pythonw, what exactly happens to stderr?


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...


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...70&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/groups?selm=...t%40python.org

The problem is confirmed to still exist with Python 2.3.4.

-Peter
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric Ching | last post by:
Can I run pythonw with a script that takes command line arguments then launches a GUI? I try pythonw myscript.pyw -option arg (etc.) and nothing happens. Nothing, as in I am immediately returned...
5
by: Robin Becker | last post by:
There seems to be a problem with calling subprocesses from a script run with pythonw rather than python. The error doesn't seem to be a function of using pythonw.exe rather than python.exe in the...
1
by: Jo Schambach | last post by:
I wrote a python GUI with tkInter and installed it on a windows machine with the .pyw extension, so it will be executed from pythonw.exe instead of python.exe, since I didn't want the console...
1
by: Roger Miller | last post by:
I was going to ask how to a program can tell whether it was started by python.exe or pythonw.exe, but after some experimentation I noticed that sys.stdin.fileno() is -1 in the latter case. ...
5
by: Ron Garret | last post by:
I'm trying to run the Python examples distributed with XCode and they all give me the same error: Traceback (most recent call last): File "checktext.py", line 35, in <module> main() File...
37
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance...
3
by: John Velman | last post by:
New to mac. I have leopard. What's the difference between python and pythonw? So far (which isn't very far) I can't tell the difference. I have a small application using TKinter that I was...
1
by: Lincoln Yeoh | last post by:
Hi, I've just started to learn python (I've been using perl for some years). How do I redirect ALL stderr stuff to syslog, even stderr from external programs that don't explicitly change their...
2
by: khalidanwar123 | last post by:
i am getting the following error while updating a clob field. ERROR java.sql.SQLException: Data size bigger than max size forthis type: 4003 19:28:27,499 ERROR at...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.