Re: Writing to open subprocess pipes.

2010-06-16 Thread Nobody
On Wed, 16 Jun 2010 16:29:42 -0400, Brandon McGinty wrote: > Both subprocess and os.popen* only allow inputput and output one time, > and the output to be read only when the process terminates. This is incorrect; you can read from and write to the pipe as you wish. However: you may have problems

Re: Writing to open subprocess pipes.

2010-06-16 Thread Brandon McGinty
Ah. Thank you all for your quick responses. I shall implement non-blocking stdin/stdout objects, then. Thank You, Brandon McGinty On 6/16/2010 5:37 PM, Thomas Jollans wrote: On 06/16/2010 10:29 PM, Brandon McGinty wrote: All, I have researched this both in the python documentation, and via

Re: Writing to open subprocess pipes.

2010-06-16 Thread Thomas Jollans
On 06/16/2010 10:29 PM, Brandon McGinty wrote: > All, > I have researched this both in the python documentation, and via google. > Neither subprocess nor os.popen* will do what I need. > First, I would instanshiate an ongoing shell, that would remain active > throughout the life of the socket conne

Re: Writing to open subprocess pipes.

2010-06-16 Thread Stephen Hansen
On 6/16/10 1:29 PM, Brandon McGinty wrote: > Both subprocess and os.popen* only allow inputput and output one time, > and the output to be read only when the process terminates. Its not that subprocess only *allow* input and output one at a time, but that it a) provides blocking file objects by de

Re: Writing to open subprocess pipes.

2010-06-16 Thread Ian Kelly
On Wed, Jun 16, 2010 at 2:29 PM, Brandon McGinty wrote: > Both subprocess and os.popen* only allow inputput and output one time, and > the output to be read only when the process terminates. You can read output before the subprocess terminates by setting the pipe to be non-blocking: import fcntl

Writing to open subprocess pipes.

2010-06-16 Thread Brandon McGinty
All, I have researched this both in the python documentation, and via google. Neither subprocess nor os.popen* will do what I need. First, I would instanshiate an ongoing shell, that would remain active throughout the life of the socket connection. I am trying to take commands, coming in from a s