[EMAIL PROTECTED] wrote: > Hello, > I am trying to fill in a dword value into an array and i get an > overflowerror > > Here's what iam trying to do. > > from array import * > data = array('B', '\0' * 256) > > val = 0xFFFFFFFF > > for i in range(256): > data[i] = val > > print data > > How do i fill in the val 256 times into the array?
'B' creates bytes, and a byte can only store numbers in the range 0 to 255. Try using 'L' when creating your array. Will McGugan -- http://www.willmcgugan.com "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz" ] ) -- http://mail.python.org/mailman/listinfo/python-list