Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-09 Thread Nick Craig-Wood
dmoore <[EMAIL PROTECTED]> wrote: > On Jun 8, 12:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > Windows has a really strange idea of non-blocking IO - it uses > > something called overlapped io. You or in the FILE_FLAG_OVERLAPPED > > flag when you create the file/pipe. You then pass in ov

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-08 Thread dmoore
On Jun 8, 12:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Windows has a really strange idea of non-blocking IO - it uses > something called overlapped io. You or in the FILE_FLAG_OVERLAPPED > flag when you create the file/pipe. You then pass in overlap buffers > for reading writing. > the

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-08 Thread Nick Craig-Wood
Noah <[EMAIL PROTECTED]> wrote: > On Jun 7, 9:01 am, dmoore <[EMAIL PROTECTED]> wrote: > > popen and friends will never do what you want it to do. Down that path > lies bitter disappointment. > You need pseduo-ttys and non-blocking IO. I don't know how to do this > on Windows, but I know it's

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-07 Thread dmoore
thanks for all of your responses. i'll look more closely at pexpect (The version I originally saw was much much older). I do want a cross- platform solution. I'm pretty busy so getting the wxProcess magic into useful shape will take me some time (at least on the order of weeks) so other interest pa

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-07 Thread Noah
On Jun 7, 9:01 am, dmoore <[EMAIL PROTECTED]> wrote: popen and friends will never do what you want it to do. Down that path lies bitter disappointment. You need pseduo-ttys and non-blocking IO. I don't know how to do this on Windows, but I know it's possible. Cygwin does it. > Anybody have any th

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-07 Thread Nick Craig-Wood
dmoore <[EMAIL PROTECTED]> wrote: > I've seen the following issue come up in multiple posts to this > mailing list: > > I have a python program that spawns a child process with popen or > popen2 or popen3 or popen2.popen2 etc. > the child process is interactive: it asks for input then spits o

Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-07 Thread dmoore
Hi folks, I've seen the following issue come up in multiple posts to this mailing list: I have a python program that spawns a child process with popen or popen2 or popen3 or popen2.popen2 etc. the child process is interactive: it asks for input then spits out some output, asks for more input then