You're right, I use Python 2.6.6
--
http://mail.python.org/mailman/listinfo/python-list
Thank you to all of you !!
so finally, I can simply write :
#!/usr/bin/env python
def int2binPadded(number, size):
"""The purpose of this function is to convert integer number to binary
number
0-padded."""
if type(number)!=int or number < 0:
raise ValueError, "should be a
Hi there,
I've been looking for 2 days for a way to convert integer to binary number
0-padded, nothing...
I need to get numbers converted with a defined number of bits. For example on 8
bits 2 = 0010
I wrote the following:
#!/usr/bin/env python
def int2binPadded(number, size):
"""The