Re: [C++-sig] to_python converter and make_getter

2013-01-23 Thread Michael Wild
On 01/23/2013 07:03 PM, Jim Bosch wrote: > On 01/23/2013 12:56 PM, Michael Wild wrote: > > > >> >> Yes, I thought of that too. While this "solves" this case (it certainly >> is not very discoverable for future maintainers), it does not help in >> the case of container support. Say I wanted to ex

Re: [C++-sig] to_python converter and make_getter

2013-01-23 Thread Jim Bosch
On 01/23/2013 12:56 PM, Michael Wild wrote: Yes, I thought of that too. While this "solves" this case (it certainly is not very discoverable for future maintainers), it does not help in the case of container support. Say I wanted to expose std::vector (or std::vector from the Boost.Python FAQ

Re: [C++-sig] to_python converter and make_getter

2013-01-23 Thread Michael Wild
On 01/23/2013 05:44 PM, Jim Bosch wrote: > On 01/23/2013 12:34 AM, Michael Wild wrote: >> On 01/22/2013 11:27 PM, Jim Bosch wrote: >>> On 01/22/2013 04:18 PM, Michael Wild wrote: Dear all I have defined a to_python converter following http://misspent.wordpress.com/2009/09/27/how

Re: [C++-sig] to_python converter and make_getter

2013-01-23 Thread Jim Bosch
On 01/23/2013 12:34 AM, Michael Wild wrote: On 01/22/2013 11:27 PM, Jim Bosch wrote: On 01/22/2013 04:18 PM, Michael Wild wrote: Dear all I have defined a to_python converter following http://misspent.wordpress.com/2009/09/27/how-to-write-boost-python-converters. Everything is fine and dandy,

Re: [C++-sig] Failed to import pyd File When python embed into C++

2013-01-23 Thread Wojciech Mamrak
Before initilizing Python interpreter you need to register your module: PyImport_AppendInittab("pythonDll", initpythonDll); regards 2013/1/23 Michael Wild : > On Wed, Jan 23, 2013 at 8:19 AM, salinea wrote: >> >> >> I create a pyd File named "testPyd" with boostPython,and then I import the >> te

Re: [C++-sig] to_python converter and make_getter

2013-01-23 Thread Giuseppe Corbelli
On 23/01/2013 06:34, Michael Wild wrote: Dear all I have defined a to_python converter following http://misspent.wordpress.com/2009/09/27/how-to-write-boost-python-converters. Everything is fine and dandy, however what bugs me is having to specify a return_value_policy() for every make_getter c

Re: [C++-sig] Failed to import pyd File When python embed into C++

2013-01-23 Thread Michael Wild
On Wed, Jan 23, 2013 at 8:19 AM, salinea wrote: > > I create a pyd File named "testPyd" with boostPython,and then I import the > testPyd module into "test.py", it works perfect! > But when I embeded the python interpreter into my C++ project and run the > "test.py", it comes out a "ImportErr: no