extensible stack-based RPN calculator based on curses
Project description
What is esc?
esc (pronounced /esk/) is an Extensible Stack-based Calculator designed for efficiency and customizability. What does this mean?
-
esc is stack-based, operating using a Reverse Polish Notation-like syntax. Rather than typing
2 + 2
and pressing an equals key, you enter the two numbers2
and2
onto the stack, then choose+
to add them. This can be slightly awkward at first, but it means no parentheses are necessary, and for most people it becomes faster and more elegant than the standard algebraic method with a small amount of practice. In addition, it is considerably easier to customize and program. -
esc is extensible. If you frequently need to multiply two numbers together, add five, and then divide the result by pi, you can add an operation to the calculator to do this specific operation using a couple of lines of Python code. The extension features are simple enough to be accessible even to people who do not know Python or have little to no programming experience.
esc operations are arbitrary Python code, so if you want to get fancy, they can get arbitrarily complicated. You can even call APIs to perform calculations or get data!
-
esc is fast, simple, and terminal-based. All you need is a working terminal (at least 80×24) and your keyboard.
Installation
esc requires Python 3.6 or greater.
It is lightweight and has no dependencies outside the standard library
(except on Windows, where ncurses
isn't available by default
and the windows-curses
package is transparently installed to fix that).
The recommended installation method is through pip:
$ pip install --user esc-calc
This will install an esc
command to your system path which will launch esc.
After installing esc, you may wish to install plugins
(see the "Plugins" section in the user guide).
Official plugins can be downloaded
from the esc-plugins
folder of this repository.
Development
For development, clone this repository, build a virtualenv with the necessary development tools, and install esc into it:
$ git clone https://github.com/sobjornstad/esc
$ cd esc
$ virtualenv --python=python3.7 venv # or 3.6 if you don't have 3.7
$ . venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e esc
$ esc
Documentation
The user manual and API documentation on writing plugins for esc are maintained on Read The Docs.
Contributing
Bug reports, suggestions, and code contributions are welcome.
In particular,
if you write a plugin that might be useful to someone else,
please consider submitting it for inclusion
in the official esc-plugins
directory.
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
Built Distribution
File details
Details for the file esc-calc-1.0.0.tar.gz
.
File metadata
- Download URL: esc-calc-1.0.0.tar.gz
- Upload date:
- Size: 43.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bf9b336d4b610c995d3b6ab49ec0bc9857fc552c7ab5db53b24b881ad82a127 |
|
MD5 | 980dcd5b0519ebedb89150474313f8d0 |
|
BLAKE2b-256 | 7a6022fbe0b8527645611db3f3ac22efda1d0e02ebcc1381a71edc0d1d69a038 |
File details
Details for the file esc_calc-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: esc_calc-1.0.0-py3-none-any.whl
- Upload date:
- Size: 63.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0596bd376aeb1145f8147683b223f41b2006025ebb586a2f2686610ce84a773 |
|
MD5 | e4eece53f6a4810452d1783c73258878 |
|
BLAKE2b-256 | 1522fbbbe8b85355de4f7ce99be2c824a213845e9a4d2d2a4917ae12fe088de3 |