pash
About
Since many of my recent Python projects have included an interactive shell / command prompt of some sorts, I've decided to write my own package for it, so that I won't have to think of a new way of handling commands everytime.
I hope it can be of some use to other Python programmers as well, as it'll hopefully make my life a lot easier.
Install
Installing pash is very easy thanks to pip:
python3 -m pip install pash-cmd
Usage
First, create a shell ...
from pash.shell import Shell
sh = Shell(prompt='$ ')
... and then, simply add as many commands as you want/need!
from pash.command import Command
sh.add_command(Command('ping', callback=pong))
...
You can even create cascading commands ...
from pash.command import CascCommand
sh.add_command(CascCommand('go', cmds=[
Command('north', callback=gnorth),
Command('south', callback=gsouth),
]))
...
Documentation
The full docs are hosted here. (Please excuse the messiness, it's my first time working with sphinx, readthedocs, etc. ^^)
... Matthias M. (April 2020)
Metadata
Release files for pash-cmd 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pash-cmd-0.0.7.tar.gz | 8.4 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pash_cmd-0.0.7-py3.9.egg | Legacy Egg format | - | - | Details |
| pash_cmd-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.3 kB
Release files / pash-cmd-0.0.7.tar.gz
| Download URL | pash-cmd-0.0.7.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
688c9e7bd79eb5044c8ae0d0281f1acb1802dea7ed8fd6eff146590aaaa7642b
|
|
BLAKE2b-256 checksum How to use checksums |
051721f2abc244402965a0942c08a3254e0fb02f9f104beced7f6c37ca923fed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / pash_cmd-0.0.7-py3.9.egg
| Download URL | pash_cmd-0.0.7-py3.9.egg |
|---|---|
| Size | 19.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
fb72244276074408aca99c563ecc22c489faf856cc2cbfb92b6c52fa320618c3
|
|
BLAKE2b-256 checksum How to use checksums |
d3c30969bfc0691fa2f3e94f5e508ca89d49b3016b4eca9f1e9141a0794c9527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / pash_cmd-0.0.7-py3-none-any.whl
| Download URL | pash_cmd-0.0.7-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d93eb37a35c4270865ec149c871b60a8ce73d9a3661f6a644dce300153f72a10
|
|
BLAKE2b-256 checksum How to use checksums |
5042a224fa9b9ce615a42718e2a5d74de321e5244ee9edb5ec79a7a2947f8391
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|