def WIFkey_to_binPrivateKey(wif): if len(wif) != 52: print 'Error' return None bpk = b58decode(wif)[1:33] return bpk