interactive python shell

Patrick K. O'Brien pobrien at orbtech.com
Thu Mar 28 10:21:06 EST 2002


PyCrust does this. It is an embeddable Python shell and namespace viewer
written in Python using the wxPython gui toolkit. It now ships with
wxPython, but the version in CVS is more current and includes lots of unit
tests and subtle enhancements (some not so subtle as well). You can find it
here:

http://sourceforge.net/projects/pycrust

There are a few projects that I know of using PyCrust in the way you
describe (it can also be used standalone). The most prominent is PythonCard.

http://pythoncard.sourceforge.net/

At the bottom of this page
(http://pythoncard.sourceforge.net/layouteditor.html) you can see
screenshots of the namespace viewer and the shell in action in the
PythonCard environment. All PythonCard applications have access to a variety
of runtime tools, including PyCrust.

Now, here is the part that should interest you the most. When I created
PyCrust, I wanted it to be as flexible and extensible as possible. So all
the routines that depend on wxPython are in separate modules from those
rountines that don't, and the dependencies have been kept to a minimum. That
means you could borrow half the existing code and simply add the PyQt
interface on top. Or at least mine the code for ideas. Let me know if you
have any interest in this.

--
Patrick K. O'Brien
Orbtech


"ian reinhart geiser" <geiseri at yahoo.com> wrote in message
news:mailman.1017254623.8656.python-list at python.org...
>
> Greetings
> I have an python application and I would like to provide a "console" in
the
> application where users can have an interactive session with python that
has
> all of the applications enviroment.  This is for debugging the system in
real
> time.
>
> Is there an easy way to do this?  All it needs to do is execute commands
and
> return data.  I am using PyQt for my GUI, so it would be cool to fit into
> there, but I can get away with a input line and a display view if that is
> easier.  This is not for production, only to make a more useful debug
tool.
>
> TIA
>
> - -ian reinhart geiser






More information about the Python-list mailing list