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 Jakub Piotr Cłapa
John Russell wrote: 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 -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 t

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 -0400, John Russell <[EMAIL PROT

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 > > returns a tuple. The second creates

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 Tiago Cogumbreiro
Here is the code that i was referring to in a previous email: http://cvs.sourceforge.net/viewcvs.py/*checkout*/traveller/traveller/spawner.py?rev=1.9 I hope this clears up the remaining confusion. On Sat, 2004-07-10 at 19:28, John Russell wrote: > On Sat, 10 Jul 2004 16:36:14 +0200, Danny Milosav

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 ! :) > > pipe = popen2.Popen4(cmd) > print p

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 PID. Thanks though. > > oh but you

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Tiago Cogumbreiro
On Sat, 2004-07-10 at 14:36, Danny Milosavljevic 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 ! :) > > pipe = popen2.Popen4(cmd) > print pipe.pid > fc = pipe.fromchi

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Danny Milosavljevic
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 ! :) pipe = popen2.Popen4(cmd) print pipe.pid fc = pipe.fromchild cheers, Danny signature.asc Description: Dies ist ein digital sign

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread John Ehresman
John Russell wrote: 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. The child pid is accessible if you create Popen3 or Popen4 in

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 Russell wrote: > > I want exactly this gli

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Danny Milosavljevic
Hi, Am Sam, den 10.07.2004 um 9:41 Uhr -0400 schrieb 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,

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Gustavo J. A. M. Carneiro
A Sáb, 2004-07-10 às 15:04, Danny Milosavljevic escreveu: > Hi, > > Am Sam, den 10.07.2004 um 10:46 Uhr -0300 schrieb Christian Robottom > Reis: > > On Sat, Jul 10, 2004 at 09:41:09AM -0400, John Russell wrote: > > > I want exactly this glib function in python. I haven't been able to > > > find a

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Johan Dahlin
> > See http://bugzilla.gnome.org/show_bug.cgi?id=13917 > > Hm it says "bug #13917 does not exist" btw... Christian ment 139176: http://bugzilla.gnome.org/show_bug.cgi?id=139176 -- Johan Dahlin <[EMAIL PROTECTED]> ___ pygtk mailing list [EMAIL PRO

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Christian Robottom Reis
On Sat, Jul 10, 2004 at 04:04:58PM +0200, Danny Milosavljevic wrote: > > See http://bugzilla.gnome.org/show_bug.cgi?id=13917 > > Hm it says "bug #13917 does not exist" btw... /me curses X paste and corrects himself http://bugzilla.gnome.org/show_bug.cgi?id=139176 Take care, -- Christian Rob

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Danny Milosavljevic
Hi, Am Sam, den 10.07.2004 um 10:46 Uhr -0300 schrieb Christian Robottom Reis: > On Sat, Jul 10, 2004 at 09:41:09AM -0400, John Russell wrote: > > 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

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Tiago Cogumbreiro
Use popen{2,3,4} (http://pydoc.org/2.3/popen2.html) On Sat, 2004-07-10 at 13:41, John Russell wrote: > 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

Re: [pygtk] g_spawn_async_with_pipes in python

2004-07-10 Thread Christian Robottom Reis
On Sat, Jul 10, 2004 at 09:41:09AM -0400, John Russell wrote: > 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, retur

[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.