Darren Mulholland

Int

A command line integer conversion utility.


Int is a handy little command line utility for converting integers between bases. It accepts an integer in binary, octal, decimal, or hex form, then prints it out in all four bases.

Interface

Run int --help to view the application's command line help:

Usage: int [FLAGS] INT [INT ...]

  Integer conversion utility. Prints an integer in [b]inary,
  [o]ctal, [d]ecimal, and he[x] bases.

  Use a single letter prefix to declare the base of the
  input, e.g. b1010. The base defaults to [d]ecimal if the
  prefix is omitted.

  This utility:

  - Accepts integer inputs with a leading zero, e.g. 0x123.
  - Accepts multiple arguments.
  - Does not accept negative integers.

Flags:
  --help        Print this help text and exit.
  --version     Print the version number and exit.

Installation

Install from the Python package index using pip:

$ pip install int

Int requires Python 3. You can find the source files on Github.

License

This work has been placed in the public domain.