Hi All,
I’ve been using wxWidgets for several years but I’m a newbie concerning Python and wxPython.
I’d like to embedd the wxPython interpreter in my C++ application that is statically linked against wxWidgets.
Is it possible to do so ?
Thanks for your help 
John
I’ve been using wxWidgets for several years but I’m a newbie concerning Python and wxPython.
I’d like to embedd the wxPython interpreter in my C++ application that is statically linked against wxWidgets.
Is it possible to do so ?
The short answer is yes.
But for the most part, people find it easier to embedd C++ code in a python-hosted app, than embedding python in a c++ app. Most of the hard work is the same, but all the initialization of the interpreter is a pain.
Also, static linking will be harder, as python modules are usually dynamically linked, and wxPython is set up to work this way. In theory, you could statically link everything, but you’d have some messy building to figure out, including the python interpreter itself.
Also – you will need a way to build the python–c++ bridge code. It’ll probably be easiest to use the same tool as wxPython does.
For this reason, I’d take a look at the Phoenix version – it’s not as mature, but it used nicer “wrapping” tools, and is the way of the future.
CHB
···
Thanks for your help 
John
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The interpreter is "Python". wxPython is just an add-on library.
Are you just wanting to execute Python code, or are you actually wanting
to do wxPython stuff as well? If you're a C++ programmer, you may be
familiar with Boost. There is a Boost library that makes it pretty easy
to invoke the Python interpreter from within a C++ application.
Crossing into wxPython might be more of a challenge. wxPython depends
on being able to map wxWidgets objects to Python objects. If you have
built all of your objects in wxWidgets, that mapping won't exist. I'm
not saying it's impossible, but it will be challenging.
···
mail.chiot2@gmail.com wrote:
I've been using wxWidgets for several years but I'm a newbie
concerning Python and wxPython.
I'd like to embedd the wxPython interpreter in my C++ application that
is statically linked against wxWidgets.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.