By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,994 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,994 IT Pros & Developers. It's quick & easy.

wxPython in C++ app using wxWidgets

P: n/a
I have an application written in C++ that uses wxWidgets for GUI. I use
embedded Python for scripting inside of this application. I want to use
wxPython to add GUI to my scripts - because my C++ App uses wxWidgets I
thought it to be easy. The problem is that wxPython knows nothing about
wxApp/wxFrame objects created in my C++ application, and insists (by giving
me asserts) that I create another wxApp object for wxPython inside my
scripts. Obviously, this is not what I want. I want the scripts to use the
same wxApp/wxFrame object that my C++ application already created. More
specifically, I want to create dialogs in wxPython that will have my
application wxFrame as parent.

I'm stuck. Any help appreciated.

Thanks,
M.
Aug 17 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 8/17/07, Marcin Kalicinski <ka****@poczta.onet.plwrote:
I have an application written in C++ that uses wxWidgets for GUI. I use
embedded Python for scripting inside of this application. I want to use
wxPython to add GUI to my scripts - because my C++ App uses wxWidgets I
thought it to be easy. The problem is that wxPython knows nothing about
wxApp/wxFrame objects created in my C++ application, and insists (by giving
me asserts) that I create another wxApp object for wxPython inside my
scripts. Obviously, this is not what I want. I want the scripts to use the
same wxApp/wxFrame object that my C++ application already created. More
specifically, I want to create dialogs in wxPython that will have my
application wxFrame as parent.

I'm stuck. Any help appreciated.
I've never done this, but there's a sample in the wxPython source
distribution (I don't think it's in the packaged versions). You can
see it in SVN at
http://svn.wxwidgets.org/viewvc/wx/w...ples/embedded/

If you have questions the sample doesn't answer, or if it doesn't work
for you, ask on the wxpython-users list instead of this one.
Aug 18 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.