Re: [C++-sig] Accessing Class Member Function from Python

2012-06-06 Thread Nagaraju
Hi Nat, Thank you very much for the reply. I tried making the target as ".pyd" and I am able to import it in Python script. Thanks again. Regards, Raju. On Wed, Jun 6, 2012 at 6:57 PM, Nat Linden wrote: > On Wed, Jun 6, 2012 at 6:57 AM, Nagaraju > wrote: > > > Thank you very much for your rep

Re: [C++-sig] Accessing Class Member Function from Python

2012-06-06 Thread Nat Linden
On Wed, Jun 6, 2012 at 6:57 AM, Nagaraju wrote: > Thank you very much for your reply. I am sorry if I did not explain > something clearly. > > I am doing as below after implementing the MyClass in the same file: > > BOOST_PYTHON_MODULE(hello){ > ... > } > > I am using CDLL from ctypes to load thi

Re: [C++-sig] Accessing Class Member Function from Python

2012-06-06 Thread Nagaraju
Hi Nat, Thank you very much for your reply. I am sorry if I did not explain something clearly. The output file I am generating is as Test.DLL only. I am not generating it as .pyd. This DLL has a class called MyClass. In it, I have add, sub, mul n div. I am doing as below after implementing the

Re: [C++-sig] Accessing Class Member Function from Python

2012-06-06 Thread Nat Linden
On Wed, Jun 6, 2012 at 5:09 AM, Nagaraju wrote: > I wrote a wrapper class in the same file as BOOST_PYTHON_MODULE(hello). > > Now when I compiled this DLL, I get Test.DLL. Hmm, the module thinks its name is "hello", but it's in Test.DLL? Maybe it should be hello.pyd? The .pyd is to designate it

[C++-sig] Accessing Class Member Function from Python

2012-06-06 Thread Nagaraju
Hi, I have written a sample DLL in C++. It has a class and functions for add, sub, mul and div. I wrote a wrapper class in the same file as BOOST_PYTHON_MODULE(hello). Now when I compiled this DLL, I get Test.DLL. Now from Python, I wrote a script to load this Test.DLL. How can I access add, s