ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] Sharing C++ data from different modules
by Ralf W. Grosse-Kunstleve other posts by this author
Oct 2 2003 6:19AM messages near this date
[C++-sig] Sharing C++ data from different modules | Re: [C++-sig] Sharing C++ data from different modules
--- Pierre Barbier de Reuille <pierre.barbier@[...].fr>  wrote:
>  I need to build a module for python that will be included in a broader
>  application with contributions from different teams using different
>  exporting tools (mainly SWIG or Boost.Python for C++ code, but sometimes
>  the native C fonctions are used). As we need to share C++ structures, is
>  there a way to define a function taking a PyObject* that returns a
>  pointer to the corresponding C++ object. For example, if I have a class
>  named "MyClass", I'd want to be able to write :
>  
>  MyClass* ptr = PyObjectToMyClass( py_object );
>  
>  Where py_object is a PyObject* known to correspond to a MyClass object
>  exported using Boost.Python.

Is this what you are looking for?

http://www.boost.org/libs/python/doc/tutorial/doc/extracting_c___objects.html
http://www.boost.org/libs/python/doc/v2/extract.html

Ralf


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Pierre Barbier de Reuille
Ralf W. Grosse-Kunstleve
Pierre Barbier de Reuille

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved