rendered paste bodyimport gtkimport vteclass BaseTerm: def restore(self, terminal): (text, attrs) = terminal.get_text(selected_cb, 1) def __init__(self): win = gtk.Window() win.connect('destroy', gtk.main_quit) win.set_title('simone@euclide') terminal = vte.Terminal() command = None terminal.set_cursor_blinks(1) #terminal.set_emulation('xterm') terminal.set_font_from_string('monospace 10') terminal.set_scrollback_lines(5000) terminal.set_audible_bell(0) terminal.set_visible_bell(0) terminal.connect('restore-window', self.restore) if (command): child_pid = terminal.fork_command(command) else: child_pid = terminal.fork_command() vbox = gtk.VBox() vbox.pack_start(terminal) terminal.show() win.add(vbox) win.show_all()if __name__ == '__main__': init = BaseTerm() try: gtk.main() except KeyboardInterrupt: raise SystemExit