Ascii to binary conversion

azrael jura.grozni at gmail.com
Sat Aug 9 09:18:04 EDT 2008


Hy folks,

I googled, and searched, and can not bealive that I have not found a
built in way to convert the easy and elegant python way a function to
easily convert simple ascii data to binary and back.

I've written some my own but they were pretty slow using binascii
linbrary with hexifly and unhexifly functions conbined with a
lookuptable of binary and hex values.

Any idea how to easily write a function that recieves a character or
string and returns a binary number like:
ascii("1") is converted to bin("00110001")



More information about the Python-list mailing list