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.

It's not meant to be a full python development environment, rather a small calculator for a few lines at a time. A sort of scratchpad for small pieces of calculation logic.

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.

Modules Column (Math, NumPy, Pandas, Matplotlib)

  • The middle column features tabs for Math, NumPy, Pandas, and Matplotlib.
  • Tab titles in this column act as clickable links that open official documentation for each module in your web browser.
  • The Math tab provides buttons for functions and constants in Python's standard math module.
  • The NumPy, Pandas, and Matplotlib tabs provide interactive buttons for top-level entry points (np.array(), pd.DataFrame(), plt.plot(), etc.) when those libraries are installed.
  • Clicking any button inserts the function or symbol directly into the interpreter.

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, to modify during development:

    • 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.2

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.2
File Size Uploaded Provenance Actions
pinq_calc-0.0.2.tar.gz 278.3 kB Without provenance Details for pinq_calc-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 559.7 kB

Release files / pinq_calc-0.0.2.tar.gz

Download URL pinq_calc-0.0.2.tar.gz
Size 278.3 kB
Tags Source
SHA-256 checksum
How to use checksums
522cfcbd5b77320aee59ea19485935ac0204255ca2897a636643d2c2bdf17ade
BLAKE2b-256 checksum
How to use checksums
7f4456e432f5badcdd67bcf0a166a321764552442c173bbd8c953d0c900bf797
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.2-py3-none-any.whl

Download URL pinq_calc-0.0.2-py3-none-any.whl
Size 281.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96c02b9a08ce468dc7001f868113275661ed5b6b006db5b167f43a0ad094125d
BLAKE2b-256 checksum
How to use checksums
c03ae668e205a327a76b75356d4b17f179f6e504c5514a647fd2865b319fa134
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.2

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