Skip to main content

Powerful yet easy command line calculator.

Project description

![](https://raw.githubusercontent.com/cruisen/cli-calc/4986df3abb3f1871d6669dec27d5e37aba0d11a3/assets/images/Cli-Calc.png

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

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.9.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

cli_calc-0.1.9-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli-calc-0.1.9.tar.gz
  • Upload date:
  • Size: 10.5 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.9.tar.gz
Algorithm Hash digest
SHA256 a5c51c2b1b8865cf05063fb4d3864f8a9e30df6afb9983387a0c2cab5c53c75f
MD5 22d8c57f1fec85af6c585ef77bb4416c
BLAKE2b-256 9da55bc693b7c324666438a6e78bfba193e04faa3bbc70eca816ee6bb2af7816

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_calc-0.1.9-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

Hashes for cli_calc-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e37b83cc5410d6e491dc51de915a90e2f6ff50d6336270762eb768adc771fab0
MD5 3bd8f9dc2f2a2595af244853199d6af4
BLAKE2b-256 a52187d10d24064569bee1c31a27d7f4416f5a626639df822db873cdfd72042d

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