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?
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?
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.
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 hurricanecqj.chen@gmail.com. I hope you can help me by mail. Thank you very much!!!
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
···
On Mon, May 23, 2016 at 2:55 AM, <hurricanecqj.chen@gmail.com> wrote:
My email is hurricanecqj.chen@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+unsubscribe@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
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!!!
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.
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