Skip to main content

Powerful yet easy command line calculator.

Project description

cli-calc

test codecov Python Version wemake-python-styleguide

Powerful yet easy command line calculator.

Example Usage

cos(pi/2)
0xFF ^ 0b10
2**8-1
factorial(42)

Installation

pip install cli-calc

See pypi 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

Tools

Style and type annotations

Testing and CT

Build and publish to pypi

Development Environment

Documentation

License

MIT

Credits

This project was generated with wemake-python-package. Current template version is: d06993f12e3ffad79652a2aec86189dee92d94dd. See what is updated since then.

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

cli-calc-0.1.5.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

cli_calc-0.1.5-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file cli-calc-0.1.5.tar.gz.

File metadata

  • Download URL: cli-calc-0.1.5.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.5 Darwin/18.6.0

File hashes

Hashes for cli-calc-0.1.5.tar.gz
Algorithm Hash digest
SHA256 76a9155a56b38a50a55c335c801e04c6d4d24a0a5a7b41d207ff4fda1dc06bfc
MD5 2555afaa8c07d3832b169a993bd0816d
BLAKE2b-256 b45627e71ac77f5589094f409e327ea5fb0fcebd08b4f31241da0879a0dd026c

See more details on using hashes here.

File details

Details for the file cli_calc-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: cli_calc-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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

Hashes for cli_calc-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 40c9527d9f5e33412537608cdec055190c757bb3eb3e4ae9b2cfae610d367248
MD5 65aad7b6b045842b4024955e54aa052e
BLAKE2b-256 6e329953739a3e467b28f9f97cdb038ac6e85506ac92851f309458b22fdca9ea

See more details on using hashes here.

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