I'm trying an example almost straight out of the version 2.5.2 documentation for the Python Library Reference for the function "a2b_base64()" which is part of the "binascii" module. I am trying to convert a hex number to its binary value. Eventually I need to convert a whole hex file to binary.
The function is techniclly for a string, but the error I'm getting says "NameError : name 'a2b_base64' is not defined". Any idea why this fails? I wish I could use a more mordern version of Python and avoid the a2b_base64() function, but can't. Thanks.
import binascii
num = a2b_base64("04")
print num