[pygtk] vte term, log file
Ed Catmur
ed at catmur.co.uk
Thu Dec 6 08:25:01 WST 2007
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
More information about the pygtk
mailing list