Re: [C++-sig] Re : changing argument value in a C++/Python code

2012-06-08 Thread Nat Linden
On Fri, Jun 8, 2012 at 8:46 AM, christophe jean-joseph wrote: > class C > { > public: > double myC; > C(){} > ~C(){} > > void setValue(double val) { > myC = val; >     } > >     double getValue() { > return myC; >     } > }; > ... > > class A > { > public: > ... > C h(){ //This function wont be o

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

Re: [C++-sig] boost::python executes wrong implementation

2010-11-02 Thread Nat Linden
On Tue, Nov 2, 2010 at 12:51 PM, AdrianB wrote: import myembedded # myserver.dll > embedded_session = myembedded.Session() # myapi.dll::Session > > #!! The ISSUE !! > embedded_session.myEmbeddedImpl() > # should call myapi.dll::Session::myEmbeddedImpl() >

Re: [C++-sig] Mapping RAW memory data into Python

2010-10-27 Thread Nat Linden
On Mon, Oct 25, 2010 at 1:51 PM, Marek Denis wrote: now I'd like to know whether it's possible to get access to the raw memory > from Python layer. > Let's suppose I have the char* ptr pointer that points to the memory chunk > with IPv4 packet. I would like to be able to read (and preferably writ

Re: [C++-sig] Using C++ classes exposed by other modules

2010-10-19 Thread Nat Linden
On Thu, Oct 14, 2010 at 1:17 PM, Bryant Gipson wrote: C++: > > void mySlightlyHelpfulFunction(cppmodule::A &a) > { > ... > } > > Python: > a = mod.A() > myModule.mySlightlyHelpfulFunction(a) > myModule.mySlightlyHelpfulFunction(A) > did not match C++ signature: > mySlightlyHelpfulFunct