'ioctl ' call in python (serial port reading)
Markus Schaber
use-net at schabi.de
Wed Dec 5 05:12:12 EST 2001
Hi,
On Tue, 04 Dec 2001 12:36:29 +0200
mixo <mixo at beth.uniforum.org.za> wrote:
> Yes, "unixoid Python incarnations" have the functions. But, here is the
> thing, in the above code, the variable "mdlns" is an integer, but
> "&mdlns" is an address. How do I get around that?
That's documented in the fnctl docu (at least the 2.1 version I read).
You pass a string containing the byte array you want to input. The module then copies the string to a new memory array, and passes this array's address. The modified memory array then is converted back to a string which is returned by the fnctl as function result.
You could convert your integers by hand, or use the struct module to do this.
markus
--
"GPL software is not free - the cost is cooperation"
More information about the Python-list
mailing list