[C++-sig] Expose c++ class as python module

2010-11-09 Thread Simon W
Hi, I want to export my c++ class and make an instance of it and then expose it to python as if it were a python module. Is it possible? // export and create instance class_ [...]; namespace["instance"] = ptr( instanceOfMyClass ); Then in python: import instance instance.someFunction() Thank

Re: [C++-sig] Expose c++ class as python module

2010-11-09 Thread Jim Bosch
On 11/09/2010 12:31 PM, Simon W wrote: Hi, I want to export my c++ class and make an instance of it and then expose it to python as if it were a python module. Is it possible? // export and create instance class_ [...]; namespace["instance"] = ptr( instanceOfMyClass ); Then in python: import