Skip to main content

A simple base converter in python3.

Project description

Description

baseXtoY is a simple multi-base converter. It supports base conversions from base 1 to base 36. Numbers contain characters from 1 to 9, and from A to Z. Note that baseXtoY is case-insensitive.

Usage

>>> import baseXtoY
>>> baseXtoY.license()  -->  displays license
baseXtoY.baseXtoY(num, **X, **Y)  -->  converts num from base X to base Y
# X and Y are keywords arguments

# example:
>>> baseXtoY.baseXtoY('FF', X=16, Y=10)  # will work
255
>>> baseXtoY.baseXtoY('FF', 16, 10)  # will not work since X and Y are not positional.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: baseXtoY() takes 1 positional argument but 3 were given

Project details


Download files

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

Source Distribution

baseXtoY-1.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

baseXtoY-1.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page