TKinter + display of a shell command return

Eric Brunel eric_brunel at despammed.com
Thu Sep 9 04:21:14 EDT 2004


Yann.K wrote:
> Eric Brunel wrote:
> 
> 
>>What is your problem here? Inserting at the end of the text and call the
>>see method on the text widget to make sure the last line is displayed
>>should be enough. An update_idletasks may also be needed to actually
>>display something, but it depends on the architecture of your script,
>>typically on whether you use threads or not.
> 
> Yes, really it run great but no as i would!
> For long process, the display wait the end of the script execution to
> display all the lines of the mesage.

The problem may not be in the Python script, but in the shell command itself: 
the output for commands is usually buffered and you won't get a chance to 
display anything until the buffer is full or the command explicitely does a 
flush. There may be a means to ask the shell to avoid buffering the command 
outputs (like Python's -u option), but my shell knowledge does not go as far as 
that... And of course, it will depend on the shell flavor you're using...

[...]
> Thanks for your help,

You're welcome. Good luck!
-- 
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com




More information about the Python-list mailing list