[wxpython-users] Access wxWidgets C++ application from embedded Python shell

Christoph Schmidt-Hieber christoph.schmidt-hieber at uni-freiburg.de
Sun Mar 23 09:01:25 PDT 2008


Hi,
I've embbeded a python shell (wx.py.shell.Shell) in my wxWidgets C++ 
application according to the suggestions in the "embedded" sample. I'm 
now wondering if it's possible to directly access some of the C++ 
application's functions from this embedded shell. As an example, would 
it be possible to call MyFrame::OnAbout (or any other function) from the 
python shell in the "embedded" sample application? I was thinking to 
expose the C++ interface to python with swig and to import the resulting 
module from the embedded shell, but I would then need to somehow 
"attach" the running application to this module.
Any help and suggestions would be greatly appreciated,
Christoph


More information about the wxpython-users mailing list