Kalkon - /kalˈkuːn/
Swedish Noun
1. a turkey; a kind of large bird (colloquial)
2. a turkey; a failure
3. a python/asteval based calculator
Quickstart
Install from PyPi
pip3 install kalkon
Install from GitHub
> git clone https://github.com/freand76/kalkon.git
> cd kalkon
> python3 -m pip install .
Start
Start using python.
> python3 -m kalkon
Start using shell script (if the pip3 bin-folder is in your path).
> kalkon
Calculator
Asteval
The calculator uses the asteval package to evaluate expressions.
Asteval handles python-like expression and will obey python rules for arithmetic and logic operators.
Example
int(sin(pi/3)*log(5) + 0xfe) & 0x23
Asteval also handles variables, i.e. you can give variable a value and use it for later calculations.
Example: Set variable
foo=3
Example: Use variable
10 + foo * 5
Commands
All commands start with a colon character Example: :hex
Output format commands
The calculator can show the result of the expression in several different modes, enter one of the following commands to switch to the desired mode.
| Command | Description |
|---|---|
| :float | Show results as floating point |
| :f32 | Show results as 32-bit float / ieee-754 |
| :int | Show results as integer, floats will be truncated |
| :i8" | Show results as signed 8-bit integer |
| :i16 | Show results as signed 16-bit integer |
| :i32 | Show results as signed 32-bit integer |
| :i64 | Show results as signed 64-bit integer |
| :u8 | Show results as unsigned 8-bit integer |
| :u16 | Show results as unsigned 16-bit integer |
| :u32 | Show results as unsigned 32-bit integer |
| :u64 | Show results as unsigned 64-bit integer |
| :dec | Show results as decimal values |
| :hex | Show results as hexadecimal values |
| :bin | Show results as binary values |
Control commands
The following command will clear the calculator stack.
| Command | Description |
|---|---|
| :clear | Clear the calculator stack |
Shortcuts
| Shortcut | Description |
|---|---|
| Shift+Enter | Drop stack item to editable field |
Metadata
Release files for kalkon 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kalkon-0.6.0.tar.gz | 61.2 kB | Without provenance | Details for kalkon-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kalkon-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for kalkon-0.6.0-py3-none-any.whl |
Total release size: 120.0 kB
Release files / kalkon-0.6.0.tar.gz
| Download URL | kalkon-0.6.0.tar.gz |
|---|---|
| Size | 61.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
029565bd4b045a2f7bc6dc86905ba619b007aff85e6c21b2780182c41e72823d
|
|
BLAKE2b-256 checksum How to use checksums |
5b9907c5fcadb1fffcd111d38b83d4cee965c3ebb3f49d66e219d56b28117ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / kalkon-0.6.0-py3-none-any.whl
| Download URL | kalkon-0.6.0-py3-none-any.whl |
|---|---|
| Size | 58.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
905c7db7bc59f5ab47d5c8218512e169e6f009a2345a3d177705059fe6294d8d
|
|
BLAKE2b-256 checksum How to use checksums |
21b38f8512b6443b0500934f4be9cfecf1a34d9e74ce263a3cb7b16f571abd43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for kalkon 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.