This is probably a basic question, so please bear with me
I want to embed a Python shell in a panel of my app such that it has access to all of the namespaces,
state information, etc., of my app for troubleshooting and testing behaviour in advance of having widgets
in the app that control it. What is the best way to do this?
This is probably a basic question, so please bear with me
I want to embed a Python shell in a panel of my app such that it has access
to all of the namespaces,
state information, etc., of my app for troubleshooting and testing
behaviour in advance of having widgets
in the app that control it. What is the best way to do this?
Use the Py module (included with the wxPython distribution).
路路路
On Wed, 27 Oct 2004 10:39:12 +0200, Peter L. Buschman <plblists@iotk.com> wrote:
This is probably a basic question, so please bear with me
I want to embed a Python shell in a panel of my app such that it has access
to all of the namespaces,
state information, etc., of my app for troubleshooting and testing
behaviour in advance of having widgets
in the app that control it. What is the best way to do this?
Use the Py module (included with the wxPython distribution).
And create a dictionary containing the items you want to be available in the namespace used in the shell, and pass it as the locals parameter of Shell.__init__. For example, from run.py in the demo: