logo       

Re: pyrexembed: How to make a method which returns a struct: msg#00029

python.pyrex

Subject: Re: pyrexembed: How to make a method which returns a struct

On 22 May, Martin Dobiasch wrote:
> Hi!
>
> I want to write a class with memberfunctions which returns structures

Who is calling these member functions?
A C-struct is not an intrinsic data type in Python.
Python uses dictionaries to store the data of a class instance.
So, even if you could return such a beast you couldn't do
anything with it.

If you just want to hand an address around use a cObject
http://docs.python.org/dev/api/cObjects.html

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise