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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

miles mccoo


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 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Robin Dunn
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
http://wxPython.org



On Tuesday, November 21, 2017 at 9:02:30 AM UTC-8, miles mccoo wrote:


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 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

miles mccoo
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 

On Tuesday, November 21, 2017 at 8:52:54 PM UTC+1, Robin Dunn wrote:
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
<a href="http://wxPython.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2FwxPython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG9kM-NEpJfIvl_lWJvA23SuLjOA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2FwxPython.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHG9kM-NEpJfIvl_lWJvA23SuLjOA&#39;;return true;">http://wxPython.org



On Tuesday, November 21, 2017 at 9:02:30 AM UTC-8, miles mccoo wrote:


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 

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