move urldecode to the executable file

This commit is contained in:
thomasv 2012-01-19 17:25:25 +01:00
parent 5e3f92b83f
commit 30e6b044cf
2 changed files with 6 additions and 3 deletions

View File

@ -23,6 +23,12 @@ from optparse import OptionParser
from wallet import Wallet
from interface import Interface
# URL decode
_ud = re.compile('%([0-9a-hA-H]{2})', re.MULTILINE)
urldecode = lambda x: _ud.sub(lambda m: chr(int(m.group(1), 16)), x)
if __name__ == '__main__':
known_commands = ['help', 'validateaddress', 'balance', 'contacts', 'create', 'payto', 'sendtx', 'password', 'newaddress', 'addresses', 'history', 'label', 'gui', 'mktx','seed','import']

View File

@ -151,9 +151,6 @@ def int_to_hex(i, length=1):
return s.decode('hex')[::-1].encode('hex')
# URL decode
_ud = re.compile('%([0-9a-hA-H]{2})', re.MULTILINE)
urldecode = lambda x: _ud.sub(lambda m: chr(int(m.group(1), 16)), x)
# AES
EncodeAES = lambda secret, s: base64.b64encode(aes.encryptData(secret,s))