Re: Non-blocking read with popen subprocess

2009-07-31 Thread birdsong
On Jul 30, 7:30 pm, Jonathan Gardner wrote: > On Jul 30, 5:24 pm, Dhanesh wrote: > > > > > how can I we have a non blocking read ? > > Seehttp://docs.python.org/library/popen2.html#flow-control-issues > > Note well: In the non-blocking world, you have to use select() or poll > () to get your job

Re: Non-blocking read with popen subprocess

2009-07-31 Thread Javier Collado
Hello, According to my experience and from what I've read in other threads, subprocess isn't easy to use for interactive tasks. I don't really know, but maybe it wasn't even designed for that at all. On the other hand, pexpect seems to work fine for interactive use and even provides a method for

Re: Non-blocking read with popen subprocess

2009-07-31 Thread Piet van Oostrum
> Jonathan Gardner (JG) wrote: >JG> On Jul 30, 5:24 pm, Dhanesh wrote: >>> >>> how can I we have a non blocking read ? >JG> See http://docs.python.org/library/popen2.html#flow-control-issues >JG> Note well: In the non-blocking world, you have to use select() or poll >JG> () to get your jo

Re: Non-blocking read with popen subprocess

2009-07-30 Thread Jonathan Gardner
On Jul 30, 5:24 pm, Dhanesh wrote: > > how can I we have a non blocking read ? See http://docs.python.org/library/popen2.html#flow-control-issues Note well: In the non-blocking world, you have to use select() or poll () to get your job done. You may want to look at "communicate" (http://docs.py

Non-blocking read with popen subprocess

2009-07-30 Thread Dhanesh
Hi , I am trying to use subprocess popen on a windows command line executable with spits messages on STDOUT as well as STDIN. Code snippet is as below :- ## sOut="" sErr="" javaLoaderPath = os.path.join("c:\\","Program