A simple shell for Python.
Project description
INSTALL:
pip3 install python-shell
How to use:
Step 1:
First create a file containing python code(will be executed when given command is used). The file does not have to have a .py extension.
To add arguments to your command, do it like this:
args = REPLACEME
for demonstration purposes i will use this simple code:
args = REPLACEME
if(args[0] == "help"): print("This command prints whatever you want. Arguments: [text to print]") else: for text in args: print(text + " ", end="")
Step 2:
Create a new shell instance and add the command like this:
from python-shell import shell
cmdline = shell() cmdline.add_command("echo", "/home/kiki/myfirstpythonscript/cmd/echo")
Now, simply start the shell by adding this:
cmdline.start()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_simple_shell-0.0.1.tar.gz.
File metadata
- Download URL: python_simple_shell-0.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1721d90fe47fa52affa59548f453dd4c59736bd8b9865c8fff764e220a6e7e6e
|
|
| MD5 |
92feee95f363a4c7b02d425d94a18425
|
|
| BLAKE2b-256 |
b834c01a3a3884642b6d0a0c7e10978a1f0eca58089eadec1896c72c1a1d499d
|
File details
Details for the file python_simple_shell-0.0.1-py3-none-any.whl.
File metadata
- Download URL: python_simple_shell-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71a061444e9932dff1cf4c994d5c73720beb0c3e7af90774a0a208e5cab54a7f
|
|
| MD5 |
f1474154130cee690b2cebd8b06a2698
|
|
| BLAKE2b-256 |
7d4eedeb86ccf13da4ddb61a2469100c591f460123d2adb5d99ec2aa04e3e9a2
|