Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

embedding phoenix in C++

1 view
Skip to first unread message

Jonathan McDougall

unread,
Jun 23, 2013, 6:04:28 PM6/23/13
to wxPyth...@googlegroups.com
Good day.

I'm working on embedding python3 in a C++ application that uses
wxWidgets. I was able to build Phoenix, call a python script from C++
have the script open a frame (which is awesome). My problem is passing
wxWidgets objects back and forth.

wxPython has a sample that uses wxPyMake_wxObject(), but I can't seem to
find anything equivalent in Phoenix. Is there anything set up right now
for this that I can use? If not, how high is this on the list of
priorities?

Thanks

--
Jonathan McDougall

Robin Dunn

unread,
Jun 24, 2013, 1:00:20 PM6/24/13
to wxPyth...@googlegroups.com
There hasn't been a lot of thought yet about embedding but take a look
at the src/wxpy_api.h file. It should have at least some of the
functions and macros that you would need to do it.

--
Robin Dunn
Software Craftsman
http://wxPython.org

hurrican...@gmail.com

unread,
May 23, 2016, 11:47:46 AM5/23/16
to wxPython-dev
Hello, according to your description, you succeed to embed wxPython in C++. But I fail to complete it. In my program, when wxPyMake_wxObjec() function is called, an exception occur, the related message is: Unhandled exception in 0x00ea7a35 in TestWxWidget2.exe: 0xC0000005: Access violation reading location 0x00000000.
    I do not know why. My tools are Visual Studio 2010, Python2.7 and wxPython2.8.11. I hope you can help me to solve the problem. My email is hurrican...@gmail.com. I hope you can help me by mail. Thank you very much!!!

Jonathan McDougall

unread,
May 23, 2016, 11:55:40 AM5/23/16
to wxPython-dev
On Monday, May 23, 2016 at 11:47:46 AM UTC-4, hurrican...@gmail.com wrote:
> Hello, according to your description, you succeed to embed wxPython in C++.

You're replying to a 3 year old thread. I haven't touched wxWidgets at
all since then. May I suggest you start a new thread with your question?

--
Jonathan McDougall

Chris Barker

unread,
May 23, 2016, 3:44:05 PM5/23/16
to wxPyth...@googlegroups.com
On Mon, May 23, 2016 at 2:55 AM, <hurrican...@gmail.com> wrote:
Hello, according to your description, you succeed to embed wxPython in C++. But I fail to complete it. In my program, when wxPyMake_wxObjec() function is called, an exception occur, the related message is: Unhandled exception in 0x00ea7a35 in TestWxWidget2.exe: 0xC0000005: Access violation reading location 0x00000000.
    I do not know why. My tools are Visual Studio 2010, Python2.7 and wxPython2.8.11. I hope you can help me to solve the problem.

I don't know if it has anything to do with your problem (but it might) -- Unless you are re-compiling Python, then you want to use VisualStudio 2008 , or, even better the "MS compiler for Python2.7 -- which is a slightly differently packaged VS 2008):


Also -- if you possible can, I would recommend calling C++ from Python, rather than Python from C++ -- it's pretty similar really, but if your "host" application is Python, you don't have to make sure you've initialized python correctly.

-CHB



 
My email is hurrican...@gmail.com. I hope you can help me by mail. Thank you very much!!!

--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

Hurricane Chen

unread,
May 23, 2016, 9:53:35 PM5/23/16
to wxPyth...@googlegroups.com
I am glad to know your suggestion. Can you tell me your suggestion? Thank you very much!!!

--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxPython-dev/sbMDm0Ggv6w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxPython-dev...@googlegroups.com.

Hurricane Chen

unread,
May 23, 2016, 9:57:27 PM5/23/16
to wxPyth...@googlegroups.com
I have downloaded and installed Microsoft Visual C++ Compiler for Python 2.7, but I do not know use it. Ca n you tell me ite uasge? Thank you very much!!!

--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxPython-dev/sbMDm0Ggv6w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxPython-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages