Are there any canned Python methods to convert an Integer (or Long) into a binary string in Python?
There are a myriad of dec2bin() functions out on Google... But I
I feel Martijn Pieter's comment deserves to be highlighted as an answer:
binary_string = format(value, '0{}b'.format(width))
To me is is both clear and versatile.