[Tutor] reg: How to import dll in python

2014-03-05 Thread Shweta Kaushik
Hi, Please find code used to create dll: add_1.cpp #include "add_1.h" using namespace std; Mathematics::Mathematics() { } void Mathematics::input() { cout << "Input two inetegers\n"; cin >> x >> y; } void Mathematics::add() { cout << "Result = " << x + y; } add_1.h #include class M

Re: [Tutor] reg: How to import dll in python

2014-03-05 Thread Emile van Sebille
Hi Shweta, You'll likely get a better response posting this question on the main python list -- the Tutor list is primarily for teaching python Emile On 3/5/2014 4:49 AM, Shweta Kaushik wrote: Hi, Please find code used to create dll: *_add_1.cpp_* #include "add_1.h" using namespace std;

Re: [Tutor] reg: How to import dll in python

2014-03-05 Thread Albert-Jan Roskam
> > From: Shweta Kaushik >To: "tutor@python.org" >Sent: Wednesday, March 5, 2014 1:49 PM >Subject: [Tutor] reg: How to import dll in python >import ctypes >From ctypes import * >testDll = cdll.LoadLibrary("D:\Python Te

Re: [Tutor] reg: How to import dll in python

2014-03-05 Thread eryksun
On Wed, Mar 5, 2014 at 7:49 AM, Shweta Kaushik wrote: > > Please find code used to create dll: I hardly ever use C++, so C++ gurus feel free to correct any errors here. I just wanted a basic C API to work with ctypes -- since that's the Python aspect of this question. I've also only targeted Micr