Skip to main content

Limited Interaction

import limitedinteraction as li

li.button_dialog("Simple dialog windows for scripters and scientists.",
                 choices=['OK'],
                 title='Limited Interaction',
                 icon='light')

message_calculating_macOS

This python module provides simple, generic dialog windows specifically aimed to scripters and scientists who need a concise, elegant way of interacting with their script users.

This module does not require any GUI programming, it has no external dependency, and it is completely independent of the graphical backend in use (if any). In IPython-based environments, its blocking functions allow interacting with Matplotlib figures while waiting for user action.

For those transitionning from Matlab, this module fulfils the same role as Matlab's msgbox, inputdlg, menu and other simple GUI functions.


Home page       GitHub       Issue tracker       API


Installing

Using pip:

pip install limitedinteraction

Using conda:

conda install -c conda-forge limitedinteraction

Usage

Importing

import limitedinteraction as li

Creating a persistent message window

li.message('Please wait a few moments.',
           title='Calculating...',
           icon='clock')

message_calculating_macOS

This is a non-blocking function. Any code after this call is executed immediately, while this message window stays in foreground. To close the message window:

li.message('')

Asking for user input

name = li.input_dialog('What is your name?', icon='question')

input_dialog_name_macOS

This is a blocking function. We wait for user input before continuing. Meanwhile, Matplotlib's event loop is refreshed so that the user can interact with figures.

This same function can have several inputs and some inputs can be masked:

credentials = li.input_dialog('Please enter your credentials',
                              labels=['Username:', 'Password:'],
                              initial_values=['username', 'password'],
                              masked=[False, True],
                              icon='lock')

input_dialog_credentials_macOS

choice_index = li.button_dialog('Please zoom on the figure and click Next.',
                                choices=['Next', 'Cancel'],
                                title='User interaction',
                                icon='gear')

button_dialog_user_interaction_macOS

This is a blocking function. We wait for a choice before continuing. Meanwhile, Matplotlib's event loop is refreshed so that the user can interact with figures.

Other functions

Get a file name using the operating system's standard file selection window:

filename = li.get_filename()

Get a folder name using the operating system's standard folder selection window:

folder = li.get_folder()

Credits

This module is developed by Félix Chénier at the Mobility and Adaptive Sports Research Lab (https://felixchenier.uqam.ca).

It includes artwork developed by these designers:

Metadata

Release files for limitedinteraction 1.0

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

Source distribution (sdist)

Source distribution for limitedinteraction 1.0
File Size Uploaded Provenance Actions
limitedinteraction-1.0.tar.gz 353.3 kB Without provenance Details for limitedinteraction-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for limitedinteraction 1.0
File Interpreter ABI Platform Actions
limitedinteraction-1.0-py3-none-any.whl Python 3 none any Details for limitedinteraction-1.0-py3-none-any.whl

Total release size: 712.9 kB

Release files / limitedinteraction-1.0.tar.gz

Download URL limitedinteraction-1.0.tar.gz
Size 353.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ddf05701e3d7bafdb9fc7b742ab2aa9fa092fd6c760898a09d0b2564e5f6524c
BLAKE2b-256 checksum
How to use checksums
bc2b3888ed57b936e7cbfd9571a5892214f753c81785671cfe474f9c0fe98d41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / limitedinteraction-1.0-py3-none-any.whl

Download URL limitedinteraction-1.0-py3-none-any.whl
Size 359.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f446cfd908369dfaa1035f526584b032de7231e7578ed2836838d832818ddef
BLAKE2b-256 checksum
How to use checksums
97dd8ddbc389086f4fec98d5f3402bc2b3cfaa72e35ad699ad32fa896b4f2304
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Security for limitedinteraction 1.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.

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