On Wed, 2007-12-05 at 01:22 -0700, Seltzer wrote:
> Hello,
> I have been trying to grab the standard out and send it both to a
> file, and
> a terminal window in my app for logging purposes, and have been having
> trouble
> getting it to show up in a vte.Terminal. This is mainly because i cant
> find the stdin of 
> the terminal.

Use vte.Terminal.feed().

import gtk, vte, gobject
t = vte.Terminal()
w = gtk.Window()
w.add(t)
w.show_all()
t.feed("Hello, world!\r\n")
gobject.timeout_add(1000, lambda nc: (t.feed("%d bottles of beer on the
wall\r\n" % nc[0]), nc[0] > 0, nc.append(nc.pop()-1))[1], [99])
gtk.main()

Ed

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to