Skip to main content

Pinq-calc Documentation

Pinq-calc: calculate things obviously, it turns out to be python.

Introduction

Python is a very natural way for humans to write simple calculations so a computer can compute results. For those learning Python, or who like Python, or people who want a calculator that is just a little more powerful than standard calculator apps. This app acts like calculator, but also like a python interpreter, with some small wrinkles to make it more intuitive to use as a calculator.

Can use on-screen keypad & keyboard when touch makes more sense, or you can hide those, and use a standard computer keyboard & keypad.

Terminal

  • Type any Python expression or statement at the >>> prompt.
  • The Enter key acts like an = on a traditional calculator, just as in python.
  • Mathematical expressions (e.g., 2 + 2) are evaluated immediately.
  • The python math library is pre-imported. Use sin(), cos(), pi, sqrt(), etc.
  • Use Up/Down arrows for command history.
  • Type clear() to reset the session.
  • Type 'quit()' to exit.
  • If you have a long series of calculations, the old results scroll off the top, and the interpreter window becomes scrollable, so you can still go back and see them.
  • To refer to the last calculation result, it's in underscore, just like in the python interpreter.
  • To store values, create a python assignment statement: LengthOfThing=34.5 You then have a LengthOfThing button you can use for inclusion in later calculations.

Math Module Column

  • python has a standard module accessed using from math import * in python interpreters.
  • The middle Math Module column has buttons for each of the entitites defined by the python math module.
  • For detailed documentation, look into documentation for that module. (https://docs.python.org/3/library/math.html)

User Defined Variables and functions

  • type an assignment in python, like p=3 and in the right side column, a p button will be created, with the value 3.
  • You can now change the value of p by clicking on the number.
  • You can still change the value of p in the interpreter, say p=25
  • You can also define python functions as you would in a python interpreter:
    
     def doublen(n):
         return 2*n
    
    
    now you have a key labelled doublen and it can invoked like any other button

Keypad

  • Use the on-screen buttons for digits and operators.
  • The clear button resets the entire session.
  • Click the button (▼ Keypad / ▲ Keypad) at the bottom of the left column (or use View -> Show Keypad) to toggle keypad visibility. When hidden, the interpreter expands to fill the left column.

On-Screen Keyboard

  • Click the toggle bar (▲ Keyboard / ▼ Keyboard) at the very bottom of the application (or use View -> Show On-Screen Keyboard) to display a full QWERTY keyboard spanning under all three columns.
  • Hidden by default. Includes shift, caps lock, backspace, navigation arrows, space, and clear keys.

Symbol Table

  • Variables: Double-click to edit values inline.
  • Functions: Double-click to open the code editor.

Sessions

  • if you make some functions and variable your would like to save for later, you can save it to a session file.
  • Using the Menu: File/Save As... or Save
  • The file is plain python (with a .py suffix).
  • The app will remember the last session and reload it automatically.

Settings

  • Toggle between Pinq Pink and System Colours in the File -> Settings menu.

Installation

  • from PIP:

    • pip install pinq-calc
  • from Source:

    • pip install -e . --break-system-packages

Contributions

This was just something I personally wanted. Suggestions and Contributions welcome. It was entirely written using Gemini, guided by my taste, such as it is. The home is: https://github.com/petersilva/pinq-calc

Metadata

Release files for pinq-calc 0.0.1

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

Source distribution (sdist)

Source distribution for pinq-calc 0.0.1
File Size Uploaded Provenance Actions
pinq_calc-0.0.1.tar.gz 26.1 kB Without provenance Details for pinq_calc-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinq-calc 0.0.1
File Interpreter ABI Platform Actions
pinq_calc-0.0.1-py3-none-any.whl Python 3 none any Details for pinq_calc-0.0.1-py3-none-any.whl

Total release size: 55.1 kB

Release files / pinq_calc-0.0.1.tar.gz

Download URL pinq_calc-0.0.1.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a81df327512e218bd40f6f3564f5a9ba2aeaed38d4057d18a144bd6910e9a7fe
BLAKE2b-256 checksum
How to use checksums
3a1804aa790ba894dad3afd7640495e7f8b0b574d9b8cda43dcfe28ef9cb3bf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / pinq_calc-0.0.1-py3-none-any.whl

Download URL pinq_calc-0.0.1-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86d143dde38b867803a5b772c3e47952a3d2ca80ff249625875f18de4934cce2
BLAKE2b-256 checksum
How to use checksums
c2d347c175fc50055aba01003402d54dfa587cc4a77476d43b175563bdff7c9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for pinq-calc 0.0.1

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.

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