ioctl
Matt Cheselka
cheselka at tucana.noao.edu
Tue Feb 1 11:28:52 EST 2000
I'm talking to a device driver that wants the address of a pointer to an array
as it's input. In C, it looks like this:
char linearray[NUM], *subarr;
<do something with linearray[]>
subarr = linearry
ioctl (fd, DO_SOMETHING, &subarr);
How do I do the same thing in python? What I've got sofar is an array:
d = array.array('i')
for i in range (1000):
d.append(0)
ptr, len = d.buffer_info()
But now I need to pass the address of the 'ptr' to the ioctl command.
Any help with this would be greatly appreciated.
Cheers,
Matt Cheselka
cheselka at noao.edu
More information about the Python-list
mailing list