Powerful yet easy command line calculator.
Project description
cli-calc
Powerful yet easy command line calculator.
Example Usage
cos(pi/2)
0xFF ^ 0b10
2**8-1
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
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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cli-calc-0.1.8.tar.gz
(10.4 kB
view details)
Built Distribution
cli_calc-0.1.8-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file cli-calc-0.1.8.tar.gz
.
File metadata
- Download URL: cli-calc-0.1.8.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.8.5 Darwin/18.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b53145437b478affbf54f874653e535662e037532bdbf0f14fac26b096770cae |
|
MD5 | fd218b189ba85c355be16e635df9cf01 |
|
BLAKE2b-256 | 446982555bc119621af508930f100d75a944aa2cb1091e2a8c7d138873ffe17c |
File details
Details for the file cli_calc-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: cli_calc-0.1.8-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.8.5 Darwin/18.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 352d90844b02c08c16e48193ea6d77ad88e039334392c36cfbd3a66338100856 |
|
MD5 | 0292e7f836dae7c637352892f9fdc37f |
|
BLAKE2b-256 | 23651d3f12541321badc30436740184840cb94bcc3ea25db0780b05d6d0343d3 |