Re: memcpy

2007-09-11 Thread Marc 'BlackJack' Rintsch
On Tue, 11 Sep 2007 06:22:19 -0700, Tim wrote: > Is this what you mean? Python did not like the word c_types in front > of POINTER. Do you know why? Yes I know. Read up how importing works. > How can I re-declare a function's return type if it is declared > somewhere else? The return type of C

Re: memcpy

2007-09-11 Thread Tim
On Sep 11, 8:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 11 Sep 2007 05:09:58 -0700, Tim wrote: > > On Sep 10, 3:31 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> On Mon, 10 Sep 2007 11:38:50 -0700, Tim wrote:

Re: memcpy

2007-09-11 Thread Marc 'BlackJack' Rintsch
On Tue, 11 Sep 2007 05:09:58 -0700, Tim wrote: > On Sep 10, 3:31 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Mon, 10 Sep 2007 11:38:50 -0700, Tim wrote: >> > How do I memcpy from a pointer to an array of floats in python? >> >> >

Re: memcpy

2007-09-11 Thread Laurent Pointal
Tim a écrit : > Can I initialize something in Python that I can get access to it's > pointer? No, there is no pointer in Python semantic (they exist behind the scene in C-Python). > How about: > > self.data = > TOTAL_OUTPUT_PARMETERS*[TOTAL_PARAMETER_ENTRIES*[c_float()] > > or > > self.data

Re: memcpy

2007-09-11 Thread Tim
On Sep 10, 3:31 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 10 Sep 2007 11:38:50 -0700, Tim wrote: > > How do I memcpy from a pointer to an array of floats in python? > > > I get errors: NameError: global name 'row' is not defined

Re: memcpy

2007-09-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Sep 2007 11:38:50 -0700, Tim wrote: > How do I memcpy from a pointer to an array of floats in python? > > I get errors: NameError: global name 'row' is not defined Well than the (global) name `row` is not defined. Quite clear message, isn't it? ;-) > I

memcpy

2007-09-10 Thread Tim
How do I memcpy from a pointer to an array of floats in python? I get errors: NameError: global name 'row' is not defined I want to be able to get the row[i] array element. In C I would normally place the address of row as the first argument. cdll.msvcrt.memcpy( row, pData, 256 ) I