rxvt + python problem: script output buffered and interactive output missing 
Author Message
 rxvt + python problem: script output buffered and interactive output missing

Hi,

I'm encountering a strange problem when I run
python scripts and the Python interpreter in
an rxvt window (with tcsh) on the latest Cygwin.
This is with Win98/BeOpen Python 2.0/Cygwin 1.3.5/rxvt-2.7.2.

The scripts print some messages to stdout but
these gets buffered and appear only when the
app exits (it runs for a while). If I add
calls to flush stdout, then the messages appear
as they are printed.

If I run the Python interpreter itself, I
get no output at all, the shell just hangs,
I get the hourglass icon and I can eventually
break out with Ctrl-C's.

Things work fine with bash in a DOS box. Makes
me think that something is wrong with rxvt's
handling of stdout/stderr. But it seems to
work with some other console apps (like sftp).

Manoj



Sun, 16 May 2004 16:58:13 GMT  
 rxvt + python problem: script output buffered and interactive output missing

Quote:
> Hi,

> I'm encountering a strange problem when I run
> Python scripts and the Python interpreter in
> an rxvt window (with tcsh) on the latest Cygwin.
> This is with Win98/BeOpen Python 2.0/Cygwin 1.3.5/rxvt-2.7.2.

> The scripts print some messages to stdout but
> these gets buffered and appear only when the
> app exits (it runs for a while). If I add
> calls to flush stdout, then the messages appear
> as they are printed.

> If I run the Python interpreter itself, I
> get no output at all, the shell just hangs,
> I get the hourglass icon and I can eventually
> break out with Ctrl-C's.

> Things work fine with bash in a DOS box. Makes
> me think that something is wrong with rxvt's
> handling of stdout/stderr. But it seems to
> work with some other console apps (like sftp).

yes i have the same behaviour on my machine... python mistakenly
thinks that it has to thake its input from stdin/pipe instead of running
interactive. python runs if you specify "-i" explicit.

i guess that it has something to do with the terminal name that rxvt sets,
so that an app doesn't know that its a console window.

chris

Quote:
> Manoj

--



Mon, 17 May 2004 03:40:57 GMT  
 rxvt + python problem: script output buffered and interactive output missing

Quote:


>>I'm encountering a strange problem when I run
>>Python scripts and the Python interpreter in
>>an rxvt window (with tcsh) on the latest Cygwin.
>>This is with Win98/BeOpen Python 2.0/Cygwin 1.3.5/rxvt-2.7.2.

>>The scripts print some messages to stdout but
>>these gets buffered and appear only when the
>>app exits (it runs for a while). If I add
>>calls to flush stdout, then the messages appear
>>as they are printed.

>>If I run the Python interpreter itself, I
>>get no output at all, the shell just hangs,
>>I get the hourglass icon and I can eventually
>>break out with Ctrl-C's.

> yes i have the same behaviour on my machine... python mistakenly
> thinks that it has to thake its input from stdin/pipe instead of running
> interactive. python runs if you specify "-i" explicit.

> i guess that it has something to do with the terminal name that rxvt sets,
> so that an app doesn't know that its a console window.

       Cool, thanks, that works. Only problem is that now
       I can't quit out of the shell using Ctrl-D or Ctrl-Z.
       And Ctrl-C doesn't seem to produce a KeyboardInterrupt.

       The stty settings in tcsh seem to be fine, Ctrl-C/D/Z work
       in the shell.

       Manoj



Mon, 17 May 2004 08:36:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. output buffering--am I missing something obvious?

2. Pretty-printing Python interactive output?

3. no *Python Output* buffer?

4. buffer problems with analog output

5. missing input/output problem, please help

6. Python CGI output and Apache script log ?

7. Python cgi script - outputting images

8. PROPOSAL: A class for non-printing interactive output.

9. GUI interactive prompt with non-text output

10. Leo<--GUI interactive prompt with non-text output

11. exec an interactive program / standard output redirection

12. PythonWin - Clearing output in interactive menu?

 

 
Powered by phpBB® Forum Software