On 4 Aug., 15:14, brad <[EMAIL PROTECTED]> wrote:
> RPM1 wrote:
>
> ...
>
> > Basically you just compile your C code as a regular C code dll. ctypes
> > then allows you to access the functions in the dll very easily.
>
> Does that work with C++ code too or just C?
It works if the interface of the
brad wrote:
RPM1 wrote:
...
Basically you just compile your C code as a regular C code dll.
ctypes then allows you to access the functions in the dll very easily.
Does that work with C++ code too or just C?
On Windows, You can apparently works either with stdcall or cdecl functions.
"cty
Anish Chapagain wrote:
On 4 Aug, 14:14, brad <[EMAIL PROTECTED]> wrote:
RPM1 wrote:
...
Basically you just compile your C code as a regular C code dll. ctypes
then allows you to access the functions in the dll very easily.
Does that work with C++ code too or just C?
Hi..
I havenot tried..
brad wrote:
RPM1 wrote:
...
Basically you just compile your C code as a regular C code dll.
ctypes then allows you to access the functions in the dll very easily.
Does that work with C++ code too or just C?
I believe it does work with C++ although I have not done that. Here's a
simple ex
Anish Chapagain wrote:
> I tried wrapping a simple C code suing SWIG to Python, but am having
> problem,
Try Cython. It's a Python-like language between Python and C that compiles to
C code. It makes it very easy to call into C functions and to hide them behind
a nice Python module.
http://cython
On 4 Aug, 14:14, brad <[EMAIL PROTECTED]> wrote:
> RPM1 wrote:
>
> ...
>
> > Basically you just compile your C code as a regular C code dll. ctypes
> > then allows you to access the functions in the dll very easily.
>
> Does that work with C++ code too or just C?
Hi..
I havenot tried..before with
RPM1 wrote:
...
Basically you just compile your C code as a regular C code dll. ctypes
then allows you to access the functions in the dll very easily.
Does that work with C++ code too or just C?
--
http://mail.python.org/mailman/listinfo/python-list
Anish Chapagain wrote:
Hi!!
I tried wrapping a simple C code suing SWIG to Python, but am having
problem,
I am not too familiar with SWIG, (I have looked at it), but you may want
to try ctypes in the standard module library. It's very easy to use. I
use it on Windows with gcc but I believe
Hi!!
I tried wrapping a simple C code suing SWIG to Python, but am having
problem,
my .c file is,
Step 1:
example.c
--
double val=3.0;
int fact(int n)
{
if(n<=1)
return 1;
else
return n*fact(n-1);
}
int mod(int x, int y)
{
return (x%y);
}
Step 2:
I then created interface file as.
exa