[python-win32] kernal32.DeviceIoControl Operation Aborted

Red Rackham redrackem at yahoo.com
Fri Dec 19 21:48:28 CET 2008


Mystery solved.  The value on the port had changed from 0x09 to 0x76 from the time I used the c-based program to the time I came along and red it in Python.  Went back and used the c-based program and found the port was indeed 0x76.
 
I used your "array" example: 
    x = array.array('B')
    x.fromstring( buffer )
    t = x.tolist()
    print [hex(i) for i in t]
 
and got back "['0x8b', '0x7c', '0x0', '0x0', '0xff', '0x0', '0xfe', '0xb1', '0xff', '0x0', '0x0', '0x0',".
 
Woo hoo!!!!  I didn't know that the "array" class was capable of this, which is why I was considering the "re" module.
 
Thanks for helping me resolve the string conversion.  
Mark

 
 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081219/3972ced0/attachment.htm>


More information about the python-win32 mailing list