472,989 Members | 3,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 software developers and data experts.

wxPython in C++ app using wxWidgets

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
1 3451
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Grant Edwards | last post by:
I've decided to learn wxPython, and I'm afraid I just don't grok the whole "id" thing where you have to pull unique integers out of your, er, the air and then use those to refer to objects: ...
15
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
5
by: py | last post by:
i need to design a GUI for my python app. i heard of wxWidgets and was going to look into that, but then I saw wxPython. Why would I use wxPython over wxWidgets? thanks
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this...
6
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.2 release of wxPython is now available for download at http://wxpython.org/download.php. This is a mostly bug fix release and takes care of several "unfortunate...
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.2 release of wxPython is now available for download at http://wxpython.org/download.php. This is a mostly bug fix release and takes care of several "unfortunate...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
19
by: [david] | last post by:
I'd like to refresh the display before I start the main loop. I have code like this: app = App() app.Show() app.long_slow_init() app.MainLoop()
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.