Re: unsigned long to unsigned char

2005-06-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > > Is it possible to convert unsigned long( 4 bytes) to unsigned char(1 > byte), so that i could define a common array for both. > > import array > temp = array('B', '\0' * 512) > > for i in range( 2): > temp[0] = 0xFF > temp[1] = 0x use module

unsigned long to unsigned char

2005-06-01 Thread [EMAIL PROTECTED]
Hello, Is it possible to convert unsigned long( 4 bytes) to unsigned char(1 byte), so that i could define a common array for both. import array temp = array('B', '\0' * 512) for i in range( 2): temp[0] = 0xFF temp[1] = 0x Thanks, -Ashton -- http://mail.python.org/mailman/listi