embedding console in wxpython app

Cary Miller miller.cary at gmail.com
Sun Aug 6 21:12:14 EDT 2006


On 6 Aug 2006 14:06:30 -0700, Janto Dreijer <jantod at gmail.com> wrote:
>
> I'm writing a Linux filemanager using wxPython. I'd like to embed a
> bash console inside it. I have found the Logilab pyqonsole
> (http://www.logilab.org/projects/pyqonsole), but it uses PyQT.
>
> Does anyone know how to do this from wx?
> Is it possible to embed a PyQT widget inside wxPython?


I had the same problem.    Never  figured out how to  do it with wx
but did get it with pygtk.
#!/usr/bin/python

import pygtk
pygtk.require('2.0')
import gtk, vte

window = gtk.Window()
window.resize(600,700)
window.show()

term  = vte.Terminal()
pid   = term.fork_command('bash')
term.set_emulation('xterm')
term.show()

window.add(term)
window.show_all()
window.connect("destroy", lambda w: gtk.main_quit())
gtk.main()

Let me know if you find a way to do it with wx.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060806/8c973b27/attachment.html>


More information about the Python-list mailing list