Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A tool for conversion numbers from one base to another

Project Description

# python-radix

Python-radix library

The library contains tools for conversion numbers to a new base. Current version works with radixes from 2 to 36.

Python-radix usage examples

Python-radix has both procedural and object-oriented solutions.

Procedural way example

# to convert number 4 from base 10 to base 2

cast(4, 10, 2)

>>‘100’

You can use both str and int types for the number you convert.

Object oriented way example

# create an object to convert numbers from one base to another (here it converts from base 10 to base 2)

new = Converter(10, 2)

new.convert(4)

>>‘100’

This will work too:

new = Converter(10, 2)

new.convert(‘4’)

>>‘100’

Release History

Release History

This version
History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python_radix-0.1.1-py2.py3-none-any.whl (4.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Oct 14, 2015
python-radix-0.1.1.tar.gz (2.1 kB) Copy SHA256 Checksum SHA256 Source Oct 14, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting