Plastron
An interactive shell application Learn More Build interactive, menu driven, shell programs using Python 3+
Getting started
The easiest way to get started with Plastron is to install the library from pip.
Create a file: shell.pypip install plastronfrom plastron import Plastron
Here is sample code for a shell program with one menu to check disk space on the machine.
# An import we need
import os
# Import plastron module
from plastron import Plastron
# A useful function
def useful_disk_free_check():
os.system("df -h")
# Inatalize the shell
my_shell = Plastron("Kavun", "PLASTRON", "A personal shell")
# Create a menu for this shell
metrics_menu = my_shell.menu("metrics","Metrics")
# Create an item for this menu to run the function
disk_item = my_shell.item("disk", "Disk check")
# Add the useful function to the item's procedure
disk_item.add_procedure(useful_disk_free_check)
# Add the item to the menu
metrics_menu.add_item(disk_item)
# Add the new menu to the main menu
my_shell.menus['main'].add_item(metrics_menu)
# Launch the shell
my_shell.shell()
Now run python shell.py you should see something like this:
Metadata
Release files for plastron 1.0.5
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 |
|---|---|---|---|---|
| plastron-1.0.5.tar.gz | 7.6 kB | Without provenance | Details for plastron-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plastron-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for plastron-1.0.5-py3-none-any.whl |
Total release size: 19.1 kB
Release files / plastron-1.0.5.tar.gz
| Download URL | plastron-1.0.5.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
756edb96ddb6e24f7c2459fff13b074aca3a0545135e3009428bc968d7cba752
|
|
BLAKE2b-256 checksum How to use checksums |
9490d294f489d54e5a71a3058ef500b3bf5d97777ac79492b9fbd96ad28ed5db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.7.7
|
Release files / plastron-1.0.5-py3-none-any.whl
| Download URL | plastron-1.0.5-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc4d1bb99dd5cfaaa1f41e8e41847acc2060ee15c2f43c93b0a54ee9b32172b6
|
|
BLAKE2b-256 checksum How to use checksums |
89a5797b2f3988e6df33d6937b0e4776953ab15a9797e1103d659363d5cba32c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.7.7
|
Security for plastron 1.0.5
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.