embedding python in wxpython

Jervis Whitley jervisau at gmail.com
Tue Dec 30 16:09:21 EST 2008


On Wed, Dec 31, 2008 at 7:21 AM, Stef Mientki <stef.mientki at gmail.com>wrote:

> 5lvqbwl02 at sneakemail.com wrote:
>
>> Hi, I've looked around for a way to allow a python console from within
>> a wxPython application, but have only found stuff on embedded/
>> extending python with C/C++ or wxWidgets in C++, but not wxPython.
>>
>> Is this easy to do?  Can someone point me in the right direction?
>>
>> Also, typically when you embed a scripting language into a larger
>> application, how do you get the console environment to share data with
>> the larger application?
>>
>> For instance, if the application has some gui stuff (for example
>> clicking on a object and dragging it around), how do you get
>> "object.select(x,y)" to print out on the console, and vice-versa: the
>> object gets selected if the user types "object.select(x,y)"?
>>
>> I'd like the console to be a bidirectional representation of what's
>> going on in the gui, plus a general purpose evaluation environment
>> where you can manipulate application data via some api which is
>> automatically exposed to the console when the application opens up.
>>
>> I'm looking for high-level hints/strategies/directions.
>>
>>
> If you're looking for "high-level",
> I don't understand why you want to see what's going on in the gui,
> as I see the gui just a tool to control the real data.
> For a pretty high level data manipulation,
> something like PyLab_Works ?
> http://code.google.com/p/pylab-works/
>
> cheers,
> Stef
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Try checking out the wxPython demo package. There is an example of a widget
inspection tool in the help menu.
This tool has an embedded python console and allows introspection of live
widgets and sizers in an application.

Cheers,

Jervis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081231/bcc03cf1/attachment-0001.html>


More information about the Python-list mailing list