what's the phoenix equivalent of /wx/wxPython/wxPython.h?

91 views
Skip to first unread message

miles mccoo

unread,
Nov 21, 2017, 12:02:30 PM11/21/17
to wxPython-users


I have a c++ application that uses wxwidges and has a python interface. It also uses wxpython 3.0 (last released in 2014)

I'm trying the rabbit hole of moving to wxpython 4.0

From c++ code, I want to take a wxWindow*, convert it to some sort of PyObject and then call a python function passing that converted/wrapped/... thing.

In wxpython 3.0, I call 
 PyObject*   arg = wxPyMake_wxObject( parent, false );

I can then pass arg along to PyEval_CallObject (via a py tuple)

wxPyMake_wxObject is defined in wxPython.h




looking in the wxPython 4.0 whls, I don't see any header files.




What am I missing?

Thanks in advance
Miles 

Robin Dunn

unread,
Nov 21, 2017, 2:52:54 PM11/21/17
to wxPython-users
There hasn't been much focus yet on using Phoenix in an embedding situation, but I expect that it will still work with some adjustments.  There has been lots of internal changes in Phoenix, including the wrapper tech and runtime APIs, but many of the old API functions are still present more or less. 

Currently the header file you'll need is only in the source tree, in src/wxpy_api.h. You may want to get that and see how far you can get with it.

-- 
Robin Dunn
Software Craftsman

miles mccoo

unread,
Nov 23, 2017, 3:44:42 PM11/23/17
to wxPython-users
Thank you, Robin, for the help. src/wxpy_api.h has what I need.

Since I got it to work, I'll say that the application is Kicad's layout editor pcbnew. I am not a Kicad developer; just an occasional contributor.


The most response I've gotten that's most relevant to you was here:
> The short version: Kicad will probably want to wait to move to the
> Phoenix version of wxPython.
Not until they are package in Debian stable. This is my litmus test for
availability of new dependencies. I do not want kicad to be in the
business of building dependencies. We have already traveled down that
road and it was not a fun journey.

If nothing else, I recommend including src/wxpy_api.h somewhere in the releases.

It's not urgent, but some day, the kicad folks will want to migrate to Phoenix.

Miles 
Reply all
Reply to author
Forward
0 new messages