Ok!! It's solved, the while cycle hide me that the writeout function was called 
only once..
So, the solution was that the writeout should return True, after a succesful 
reading, and False when it's finished.
(it's the last sentence in the reference guide..sorry for my distraction!!!)
--------------CodeLauncher.py correct------------------
    def writeout(self,file,event):
        print "triggered"
        text=file.read(1)
        iter = self.buffer.get_end_iter()
        self.buffer.insert(iter,text)
        if event==gobject.IO_HUP:
            return False
        else:
            return True
------------------------------------------------------
Thank you very much :-)
On Wed, 06 May 2009 15:02:14 +0200
"A.T.Hofkamp" <[email protected]> wrote:

> Gabriele Lanaro wrote:
> 
> >     def writeout(self,file,event):
> >         text=1
> >         while text:
> >                 text=file.readline()
> >                 iter = self.buffer.get_end_iter()
> >                 self.buffer.insert(iter,text)
> 
> I have not analysed your program, so I may be wrong, but here you seem to 
> loop 
> to read all output of file (a bad name for a handle btw).
> 
> Instead of reading everything, read only what is available, and return.
> The io_watch should signal you the next time there is data.
> 
> Albert


-- 
Gabriele Lanaro <[email protected]>
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to