Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
> >>Are you sure that the perl script is flushing the output every second? > >> > > It does when I call the command from the shell. Also, Perl flushes > > whenever there is a \n. I have one at the end of each line. > > > > There are some strange things happening when stdout is a tty > (interac

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
It does when I call the command from the shell. Also, Perl flushes whenever there is a \n. I have one at the end of each line. On Sat, 10 Jul 2004 14:41:51 -0700, John Finlay <[EMAIL PROTECTED]> wrote: > > > John Russell wrote: > > >On Sat, 10 Jul 2004 16:23:01 -04

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
On Sat, 10 Jul 2004 16:23:01 -0400, John Russell <[EMAIL PROTECTED]> wrote: > > I suspect you're using: > >pipe = popen2.popen4(cmd) > > instead of > >pipe = popen2.Popen4(cmd) > > Notice the use of the capital P. The first executes a function that

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
> I suspect you're using: >pipe = popen2.popen4(cmd) > instead of >pipe = popen2.Popen4(cmd) > Notice the use of the capital P. The first executes a function that > returns a tuple. The second creates a class instance. Right again. Thanks. BTW. If I do end up os.kill()ing this process

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
On Sat, 10 Jul 2004 16:36:14 +0200, Danny Milosavljevic <[EMAIL PROTECTED]> wrote: > Hi, > > Am Sam, den 10.07.2004 um 10:23 Uhr -0400 schrieb John Russell: > > popen* doesn't work because you don't get the child PID. Thanks though. > > oh but you do ! :) &

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
Right in front of my eyes. Thank you very much. On Sat, 10 Jul 2004 16:36:14 +0200, Danny Milosavljevic <[EMAIL PROTECTED]> wrote: > Hi, > > Am Sam, den 10.07.2004 um 10:23 Uhr -0400 schrieb John Russell: > > popen* doesn't work because you don't get the child P

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
> > Kiko probably means: > > http://bugzilla.gnome.org/show_bug.cgi?id=143980 Yeah, that's even better, as long as I can get the child PID. Am I to assume that this is not possible now? All I want is to capture the output of a child process and be able to kill it if a user clicks cancel. It

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
I merely mentioned glib because I found that functoin there. I really have no attachment to glib. All I need are std* pipes _and_ the child pid. Any way of doing that would be peachy. Thanks for all the responses. On Sat, 10 Jul 2004 16:10:14 +0200, Johan Dahlin <[EMAIL PROTECTED]> wrote: > >

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
popen* doesn't work because you don't get the child PID. Thanks though. On Sat, 10 Jul 2004 13:53:22 +, Tiago Cogumbreiro <[EMAIL PROTECTED]> wrote: > Use popen{2,3,4} (http://pydoc.org/2.3/popen2.html) > > > > > On Sat, 2004-07-10 at 13:41, John Russ

[pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Russell
I want exactly this glib function in python. I haven't been able to find anything like python glib bindings, which makes sense. Do we really need g_list in python? No. But I really need a function that spawns a process, returns the std* filedescriptors and the child pid so I can kill it later.

[pygtk] Re: smoot UI with blocking-io

2004-07-05 Thread John Russell
H, i just found the gtk.input_add function in, guess where, the pygtk faq. Who new. This is probably what I want. Sorry for the premature port. John On Mon, 5 Jul 2004 14:38:47 -0400, John Russell <[EMAIL PROTECTED]> wrote: > I have read a few threads on this mailing list where fi

[pygtk] smoot UI with blocking-io

2004-07-05 Thread John Russell
I have read a few threads on this mailing list where file IO was discussed. Specifically this thread http://www.daa.com.au/pipermail/pygtk/2003-November/006233.html which talks about running something like while 1: data_o = child_o.readline()