neal becker efakcpjj5gmailcom iiuc current ioctl capable handling arbitrary argument types code allow arg type structures pointers embedded structures code _ioc taken linux might portable ctypes import libc cdll liblibcso6 print libcioctl def set_ioctl_argtype arg_type libcioctlargtypes c_int c_int arg_type _ioc_write 0x1 _ioc_nrbits 8 _ioc_typebits 8 _ioc_sizebits 14 _ioc_dirbits 2 _ioc_nrshift 0 _ioc_typeshift _ioc_nrshift_ioc_nrbits _ioc_sizeshift _ioc_typeshift_ioc_typebits _ioc_dirshift _ioc_sizeshift_ioc_sizebits def _ioc dir type nr size return dir _ioc_dirshift type _ioc_typeshift nr _ioc_nrshift size _ioc_sizeshift def ioctl fd request args return libcioctl fd request args example usage ioctl import set_ioctl_argtype pointer eos_dl_args_t eos_ioc_magic 0xf4 request _ioc_ioc_write eos_ioc_magic 0x00 0 ignore size err ioctl eos_filefileno request args _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom thu 07 aug 2008 223933 0400 pythondev enhanced ioctl