>
> Once you get used to code
> Cython, and assuming you have some C/C++ background, I bet you will
> stop using ctypes ;-) ..
>
I think you are right :). In an afternoon, I've got a decent amount of what
I need wrapped :)
Cheers!
Chris
___
Cython-dev
Likely (never used ctypes) you will need to call "ctypes.addressof",
and a call to PyLong_AsVoidPtr(). See yourself:
http://svn.python.org/view/python/trunk/Modules/_ctypes/callproc.c?view=markup
http://docs.python.org/c-api/long.html#PyLong_AsVoidPtr
cdef extern from "Python.h"
void *PyLong
yet again:
for various reasons, I would like to use both the ctypes wrapper and cython
in same program. Specifically I have a ctypes instance of an OpenCV image. I
pass the pointer of this image to a cython function which returns a pointer
to a new image. I need to get this pointer back into pytho
Hoyt,
All functions, even external ones, that can be run without the gil
> need the "nogil" decorator on the end or cython assumes it needs the
> gil. E.g.
>
> > cdef extern from "highgui.h":
> > cdef IplImage* cvLoadImage(char* file, int iscolor) nogil
> > cdef int cvNamedWindow(char* na
Hi,
> How do i get this to release the gil:
>
> when i change the cython module to the following Cython compilation fails
> claiming I'm calling a gil required function:
All functions, even external ones, that can be run without the gil
need the "nogil" decorator on the end or cython assumes it n
new question:
How do i get this to release the gil:
when i change the cython module to the following Cython compilation fails
claiming I'm calling a gil required function:
cdef extern from "cxtypes.h":
ctypedef struct IplImage:
pass
cdef extern from "highgui.h":
cdef IplImage* c
On Mon, May 18, 2009 at 7:30 PM, Chris Colbert wrote:
>
>
>>
>> This error seems like you're not linking to the python library. I
>> would recommend using distutils to compile your files. Can you
>> compile the Cython file
>>
>> print "hello"
>>
>>
>> This is totally doable from Cython.
>>
>>
>
>
>
> This error seems like you're not linking to the python library. I
> would recommend using distutils to compile your files. Can you
> compile the Cython file
>
> print "hello"
>
>
> This is totally doable from Cython.
>
>
I can compile and use cython modules that don't depend on external c
li
On May 18, 2009, at 3:21 PM, Chris Colbert wrote:
> "You can probably skip the "write my functions in a pure C source
> file" step and write them directly in Cython.
>
> - Robert"
>
>
>
> i tried doing that today and was running into boat loads of trouble
> resolving the IplImage data type and h
"You can probably skip the "write my functions in a pure C source
file" step and write them directly in Cython.
- Robert"
i tried doing that today and was running into boat loads of trouble
resolving the IplImage data type and header dependencies.
This is actually turning out to be quite diffi
On May 17, 2009, at 1:23 PM, Chris Colbert wrote:
> How would I go about interfacing with OpenCV data types in cython?
>
> I've read the wiki on interfacing with external C code but didn't
> fully follow.
>
> I'm currently using a ctypes wrapper for OpenCV from python and
> doing some manipula
How would I go about interfacing with OpenCV data types in cython?
I've read the wiki on interfacing with external C code but didn't fully
follow.
I'm currently using a ctypes wrapper for OpenCV from python and doing some
manipulation there, but I would like to chain together a bunch of functions
12 matches
Mail list logo