--------- Original Message --------
Da: Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]>
To: Dario M�ndez <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Oggetto: Re: [pygtk] Pipes and freezes
Data: 28/04/04 01:14
>
> A Ter, 2004-04-27 �s 07:58, Dario M�ndez escreveu:
> > Greetings everyone, I've just began PyGTK developing today and I
started
> > to get my GTKmm kernel compilation utility "ported" to
PyGTK.
> >
> > In order to display the make ouput I used a particular Glib method
> > (spawn_async_with_pipes).
> >
> > I've tryed looking around, but I didn't find any equivalent, so I
hooked
> > up the old popen(), wich, of course, freezes the window during the
make
> > process.
> >
> > Does anybody know a way to display the popen output while the process
is
> > running?
>
> Just like in C, in Python use gobject.input_add to know when to read
> from child stdout. Seems very simple. Or do you have a more specific
> problem?
>
> > Thanks in advance
> > _______________________________________________
> > pygtk mailing list [EMAIL PROTECTED]
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> --
> Gustavo J. A. M. Carneiro
> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
>
>
Uhm... I'm actually using this to read the make ouput
def compile_kernel(self, widget):
textbuffer = gtk.TextBuffer()
fin = os.popen("uname -r")
ker_ver = fin.readline()
fin.close()
self.compile_status.set_buffer(textbuffer)
fin = os.popen("cd /usr/src/linux && make && make modules_install && cp
arch/i386/boot/bzImage /boot/bzImage-" + ker_ver)
line = None
while line != '':
line = fin.readline()
textbuffer.insert_at_cursor(line)
fin.close()
return
I've never knew anything about gobjects, have you got some kind of reference
(possibly an example)?
Thanks
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=&d=20040428
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/