Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Convert numbers between arbitrary bases.
Python
Tree: aff32ee455

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
__init__.py

README.md

Python base module

Information

The base.rebase function provided by this package can be used to convert numbers between arbitrary bases.

Examples

>>> import base
>>> base.rebase('80', base.HEX, base.DECIMAL)
'128'
>>> base.rebase(-255, base.DECIMAL, base.HEX)
'-FF'
>>> base.rebase('1111', base.BINARY, base.DECIMAL)
'15'

MIT license

This project is licensed under an MIT license.

Copyright © 2011 Andreas Blixt (andreas@blixt.org)

Something went wrong with that request. Please try again.