Convert numbers from base 10 integers to base X strings and back again.
Sample usage:
>>> base20 = BaseConverter('0123456789abcdefghij') >>> base20.encode(1234) '31e' >>> base20.decode('31e') 1234 >>> base20.encode(-1234) '-31e' >>> base20.decode('-31e') -1234 >>> base11 = BaseConverter('0123456789-', sign='$') >>> base11.encode(-1234) '$-22' >>> base11.decode('$-22') -1234
Constant | BASE16_ALPHABET |
Undocumented |
Constant | BASE2_ALPHABET |
Undocumented |
Constant | BASE36_ALPHABET |
Undocumented |
Constant | BASE56_ALPHABET |
Undocumented |
Constant | BASE62_ALPHABET |
Undocumented |
Constant | BASE64_ALPHABET |
Undocumented |
Variable | base16 |
Undocumented |
Variable | base2 |
Undocumented |
Variable | base36 |
Undocumented |
Variable | base56 |
Undocumented |
Variable | base62 |
Undocumented |
Variable | base64 |
Undocumented |
Class | BaseConverter |
Undocumented |