How to embed a Python interpreter in a PyQT widget
Posted
by Mathias
on Stack Overflow
See other posts from Stack Overflow
or by Mathias
Published on 2010-05-03T13:00:09Z
Indexed on
2010/05/03
15:08 UTC
Read the original article
Hit count: 337
I want to be able to bring up an interactive python terminal from my python application. Some, but not all, variables in my program needs to be exposed to the interpreter.
Currently I use a sub-classed and modified QPlainTextEdit
and route all "commands" there to eval
or exec
, and keep track of a separate namespace in a dict. However there got to be a more elegant and robust way! How?
Here is an example doing just what I want, but it is with IPython and pyGTK... http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK
© Stack Overflow or respective owner