Skip to main content

calcu

publish

A simple calculator for your CLI.

(It uses Python's eval() and spits out the result, with some prettifying.)

example-gif

Installation

pip install calcu

Usage

Type c followed by your expression.

Example:

c 2+2
             = 4

Refer to the result of the previous calculation with an underscore _:

c _+10
             = 14

Do multiplication and exponentiation:

c 2 x 3^2
             = 18
# you can also use * and ** but then you must
# wrap your expression in quotes ' ' or bash will mess it up
# eg: c '2*3**2'

And dividing and brackets:

c [2+10]/10
             = 1.2
# as above, the square brackets are to stop bash cleverness
# if you want to use regular brackets, use quotes
# eg: c '(2+10)/10

Use any function from Python's math library:

c log[e] x pi
             = 3.141592654

It returns the appropriate number of decimal values, up to 9.

Metadata

Release files for calcu 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for calcu 1.0.0
File Size Uploaded
calcu-1.0.0.tar.gz 91.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for calcu 1.0.0
File Interpreter ABI Platform
calcu-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 96.2 kB

Release files / calcu-1.0.0.tar.gz

Download URL calcu-1.0.0.tar.gz
Size 91.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5e3d4b90d0eb62bcdfa965966619c35bf7a7a41d99b3608a2e46f14c895f85f4
BLAKE2b-256 checksum
How to use checksums
a8316148c978bad2a3b62fb33af4a6f588c74c17ed4993859b79ec8bd42bb5d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / calcu-1.0.0-py3-none-any.whl

Download URL calcu-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a778f84533291da41b96bd2977da632228311e5eb6ab49290e1d0f2cb5091b59
BLAKE2b-256 checksum
How to use checksums
c806f225e949d9bc021f118e6aa7c9a8a4c936785d6dcb0b0a795720736e6eeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page