cli-calc
Powerful yet easy command line calculator.
Example Usage
cos(pi/2)
0xFF ^ 0b10
2**8-1
log(2)
factorial(42)
Installation
pip install cli-calc
Configuration
In order to run it from anywhere: Add a symbolic link in ~/bin
cd ~/bin
ln -s ~/path/to/your/install/cli_calc/warpper.sh calc
Then use it anywhere. :-)
calc
echo "7+8" | calc
Help
calc
h
Input:
"q" for quit, "h" for help
"_float_" and/or "_int_" for last value
"pi", "tau" and "e" for pi, tau and Euler
"+f" to add display for fraction, "-f" to suppress display for fraction
Other letters are:
he(x), (o)ctal, (b)inary, (i)nteger,
(f)raction, (t)ruth, i(e)ee, ieee_bi(n), f(r)om_ieee
"float" is always visible
See https://docs.python.org/3/library/math.html, use without "math."
https://www.w3schools.com/python/python_operators.asp
Try "cos(pi/2)", XOR: "0xFF ^ 0b10", "2**8-1", "factorial(42)",
"help(math)"
Warning
Use of eval is evil.
However some precautions are taken.
Development tools used
Features
- Fully typed with annotations and checked with mypy.
- PEP561 compatible
Tools
Style and type annotations
Testing and CT
Build and publish to pypi
Development Environment
Documentation
License
Credits
This project was generated with wemake-python-package
. Current template version is: d06993f12e3ffad79652a2aec86189dee92d94dd. See what is updated since then.