Re: Python, Tkinter and popen problem

2009-06-01 Thread norseman
MRAB wrote: norseman wrote: Piet van Oostrum wrote: norseman (n) wrote: [snip] n> Some questions: n> 1) "...], stdout=PIPE).stdout n>^^ why the double use? It is not a double use. Popen(["z6.py"], stdout=PIPE) gives you a Popen object, not a file object

Re: Python, Tkinter and popen problem

2009-06-01 Thread MRAB
norseman wrote: Piet van Oostrum wrote: norseman (n) wrote: [snip] n> Some questions: n> 1) "...], stdout=PIPE).stdout n>^^ why the double use? It is not a double use. Popen(["z6.py"], stdout=PIPE) gives you a Popen object, not a file object. If you add

Re: Python, Tkinter and popen problem

2009-06-01 Thread norseman
Piet van Oostrum wrote: norseman (n) wrote: n> Piet van Oostrum wrote: norseman (n) wrote: n> I have tried both and Popen2.popen2(). n> os.popen runs both way, contrary to docs. What do you mean `os.popen runs both way'? n> It reads from child while console writes directly to child -

Re: Python, Tkinter and popen problem

2009-05-30 Thread Piet van Oostrum
> norseman (n) wrote: >n> Piet van Oostrum wrote: norseman (n) wrote: >>> >n> I have tried both and Popen2.popen2(). >n> os.popen runs both way, contrary to docs. >>> >>> What do you mean `os.popen runs both way'? >n> It reads from child while console writes directly to child -

Re: Python, Tkinter and popen problem

2009-05-29 Thread norseman
Piet van Oostrum wrote: norseman (n) wrote: n> I have tried both and Popen2.popen2(). n> os.popen runs both way, contrary to docs. What do you mean `os.popen runs both way'? It reads from child while console writes directly to child - thus eliminating the problem of coding a pass throug

Re: Python, Tkinter and popen problem

2009-05-29 Thread MRAB
norseman wrote: [snip] I have tried both and Popen2.popen2(). os.popen runs both way, contrary to docs. # master.py import os #both lines work same #xx= os.popen("/mnt/mass/py/z6.py").readlines() xx= os.popen("/mnt/mass/py/z6.py",'r',1).readlines() readlines() returns only when

Re: Python, Tkinter and popen problem

2009-05-29 Thread Piet van Oostrum
> norseman (n) wrote: >n> I have tried both and Popen2.popen2(). >n> os.popen runs both way, contrary to docs. What do you mean `os.popen runs both way'? >n> # master.py >n> import os >n> #both lines work same Of course, because 'r' is the default, and the bufsize for readi

Re: Python, Tkinter and popen problem

2009-05-28 Thread Peter Otten
norseman wrote: > The direct question comes back to: > How does one force a sync or flush() to take effect in Python with > Tkinter in use? Or just in Python period. The keyword being force. Here's some truly minimal code which shows the same buffering behaviour: $ cat master.py #!/usr/bin/env p

Re: Python, Tkinter and popen problem

2009-05-28 Thread norseman
Peter Otten wrote: norseman wrote: Peter Otten wrote: norseman wrote: This was sent 5/19/09 and as yet has received no comments. I'm resending just in case a new reader might have an answer. If you had posted two tiny scripts demonstrating your problem instead of the longwinded explanation

Re: Python, Tkinter and popen problem

2009-05-28 Thread MRAB
norseman wrote: Peter Otten wrote: norseman wrote: This was sent 5/19/09 and as yet has received no comments. I'm resending just in case a new reader might have an answer. If you had posted two tiny scripts demonstrating your problem instead of the longwinded explanation I might have tin

Re: Python, Tkinter and popen problem

2009-05-28 Thread Peter Otten
norseman wrote: > Peter Otten wrote: >> norseman wrote: >> >>> This was sent 5/19/09 and as yet has received no comments. >> >>> I'm resending just in case a new reader might have an answer. >> >> If you had posted two tiny scripts demonstrating your problem instead of >> the longwinded explana

Re: Python, Tkinter and popen problem

2009-05-27 Thread norseman
Peter Otten wrote: norseman wrote: This was sent 5/19/09 and as yet has received no comments. I'm resending just in case a new reader might have an answer. If you had posted two tiny scripts demonstrating your problem instead of the longwinded explanation I might have tinkered. Peter

Re: Python, Tkinter and popen problem

2009-05-27 Thread Peter Otten
norseman wrote: > This was sent 5/19/09 and as yet has received no comments. > I'm resending just in case a new reader might have an answer. If you had posted two tiny scripts demonstrating your problem instead of the longwinded explanation I might have tinkered. Peter -- http://mail.python.

Python, Tkinter and popen problem

2009-05-27 Thread norseman
This was sent 5/19/09 and as yet has received no comments. I'm resending just in case a new reader might have an answer. == I have come across a problem that, as I understand all documentation I have found, should not exist. Python version is 2.5.2, Tinker in t

Python, Tkinter and popen problem

2009-05-19 Thread norseman
I have come across a problem that, as I understand all documentation I have found, should not exist. Python version is 2.5.2, Tinker in that package. Linux Slackware 10.2 I went to test os.popen and got mixed answers. 1) IF os.popen opens a command line or command window type