kalkon


Namekalkon JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryCalculator with GUI
upload_time2024-03-20 18:32:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD 3-Clause License Copyright (c) 2023-2024, Fredrik Andersson Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords calculator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ffreand76%2Fkalkon%2Fmain%2Fpyproject.toml)
![PyPI - Version](https://img.shields.io/pypi/v/kalkon)
![PyPI - Downloads](https://img.shields.io/pypi/dm/kalkon)

# 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*

<p align="center">
  <img alt="Kalkon" src="https://raw.githubusercontent.com/freand76/kalkon/09cf8aa94aaf30b82a9e00e68c696bd3865af394/src/kalkon/images/kalkon.png" width=50%>
</p>

## 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

<p align="center">
  <img alt="Kalkon" src="https://raw.githubusercontent.com/freand76/kalkon/09cf8aa94aaf30b82a9e00e68c696bd3865af394/images/screenshot.png">
</p>

### Asteval

The calculator uses the [asteval](https://pypi.org/project/asteval) package to evaluate expressions.

Asteval handles python-like expression and will obey python rules for arithmetic and logic operators.

*Example*
```python
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*
```python
foo=3
```

*Example: Use variable*
```python
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 |

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kalkon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Fredrik Andersson <freand@gmail.com>",
    "keywords": "calculator",
    "author": null,
    "author_email": "Fredrik Andersson <freand@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/08/b6/d474bf8270c0cf4cc01b09eaffc52deca13abf38f29928c1a54cf5c296cb/kalkon-0.4.0.tar.gz",
    "platform": null,
    "description": "![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ffreand76%2Fkalkon%2Fmain%2Fpyproject.toml)\n![PyPI - Version](https://img.shields.io/pypi/v/kalkon)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/kalkon)\n\n# Kalkon - /kal\u02c8ku\u02d0n/\n\n*Swedish Noun*\n\n*1. a turkey; a kind of large bird (colloquial)*\n\n*2. a turkey; a failure*\n\n*3. a python/asteval based calculator*\n\n<p align=\"center\">\n  <img alt=\"Kalkon\" src=\"https://raw.githubusercontent.com/freand76/kalkon/09cf8aa94aaf30b82a9e00e68c696bd3865af394/src/kalkon/images/kalkon.png\" width=50%>\n</p>\n\n## Quickstart\n\n### Install from PyPi\n```\npip3 install kalkon\n```\n\n### Install from GitHub\n```\n> git clone https://github.com/freand76/kalkon.git\n> cd kalkon\n> python3 -m pip install .\n```\n\n### Start\n\nStart using python.\n\n```\n> python3 -m kalkon\n```\n\nStart using shell script (if the pip3 bin-folder is in your path).\n\n```\n> kalkon\n```\n\n## Calculator\n\n<p align=\"center\">\n  <img alt=\"Kalkon\" src=\"https://raw.githubusercontent.com/freand76/kalkon/09cf8aa94aaf30b82a9e00e68c696bd3865af394/images/screenshot.png\">\n</p>\n\n### Asteval\n\nThe calculator uses the [asteval](https://pypi.org/project/asteval) package to evaluate expressions.\n\nAsteval handles python-like expression and will obey python rules for arithmetic and logic operators.\n\n*Example*\n```python\nint(sin(pi/3)*log(5) + 0xfe) & 0x23\n```\n\nAsteval also handles variables, i.e. you can give variable a value and use it for later calculations.\n\n*Example: Set variable*\n```python\nfoo=3\n```\n\n*Example: Use variable*\n```python\n10 + foo * 5\n```\n\n### Commands\n\nAll commands start with a colon character\n*Example:* **:hex**\n\n**Output format commands**\n\nThe calculator can show the result of the expression in several different modes, enter one of the following commands to switch to the desired mode.\n\n| Command | Description |\n| :------ | :---------- |\n| :float  | Show results as floating point |\n| :f32    | Show results as 32-bit float / ieee-754 |\n| :int    | Show results as integer, floats will be truncated |\n| :i8\"    | Show results as signed 8-bit integer |\n| :i16    | Show results as signed 16-bit integer |\n| :i32    | Show results as signed 32-bit integer |\n| :i64    | Show results as signed 64-bit integer |\n| :u8     | Show results as unsigned 8-bit integer |\n| :u16    | Show results as unsigned 16-bit integer |\n| :u32    | Show results as unsigned 32-bit integer |\n| :u64    | Show results as unsigned 64-bit integer |\n| :dec    | Show results as decimal values |\n| :hex    | Show results as hexadecimal values |\n| :bin    | Show results as binary values |\n\n\n**Control commands**\n\nThe following command will clear the calculator stack.\n\n| Command | Description |\n| :------ | :---------- |\n| :clear  | Clear the calculator stack |\n\n### Shortcuts\n\n| Shortcut | Description |\n| :------- | :---------- |\n| Shift+Enter | Drop stack item to editable field |\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2023-2024, Fredrik Andersson  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Calculator with GUI",
    "version": "0.4.0",
    "project_urls": {
        "homepage": "https://github.com/freand76/kalkon"
    },
    "split_keywords": [
        "calculator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53fdf0fd130e93028697cf4cd5a5abf0c5cfa893071ab680e107d6a841e212f5",
                "md5": "2563681651a112c59ac2a39fe6045aa8",
                "sha256": "a1777138b7cec55e8201bcccbd86d0718f02307c048e6538a36a3d0c0bd80e24"
            },
            "downloads": -1,
            "filename": "kalkon-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2563681651a112c59ac2a39fe6045aa8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 59562,
            "upload_time": "2024-03-20T18:32:55",
            "upload_time_iso_8601": "2024-03-20T18:32:55.185020Z",
            "url": "https://files.pythonhosted.org/packages/53/fd/f0fd130e93028697cf4cd5a5abf0c5cfa893071ab680e107d6a841e212f5/kalkon-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08b6d474bf8270c0cf4cc01b09eaffc52deca13abf38f29928c1a54cf5c296cb",
                "md5": "6f90705b5edfbf4c203aae25e2e9f8bf",
                "sha256": "3a504a86e466b8aba5e860eec0fbd4429a8c8023cd2e704ec09053305a276d6a"
            },
            "downloads": -1,
            "filename": "kalkon-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6f90705b5edfbf4c203aae25e2e9f8bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 62231,
            "upload_time": "2024-03-20T18:32:56",
            "upload_time_iso_8601": "2024-03-20T18:32:56.619665Z",
            "url": "https://files.pythonhosted.org/packages/08/b6/d474bf8270c0cf4cc01b09eaffc52deca13abf38f29928c1a54cf5c296cb/kalkon-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-20 18:32:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "freand76",
    "github_project": "kalkon",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "kalkon"
}
        
Elapsed time: 0.20419s