A command line integer conversion utility.
Int is a handy little Python 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.
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]adecimal bases. Use a single letter prefix to declare the base of the input, e.g. b1010. The base defaults to decimal if the prefix is omitted. This utility: - Accepts integer inputs with a leading zero, e.g. 0x123. - Accepts multiple arguments. - Displays the two's complement for negative integers. Flags: -h, --help Print this help text and exit. -v, --version Print the version number and exit.
Install from the Python package index using
$ pip install int
Int requires Python >= 3.8. You can find the source files on Github.
This work has been placed in the public domain.