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
Hashes for python_simple_shell-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1721d90fe47fa52affa59548f453dd4c59736bd8b9865c8fff764e220a6e7e6e |
|
MD5 | 92feee95f363a4c7b02d425d94a18425 |
|
BLAKE2b-256 | b834c01a3a3884642b6d0a0c7e10978a1f0eca58089eadec1896c72c1a1d499d |
Hashes for python_simple_shell-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a061444e9932dff1cf4c994d5c73720beb0c3e7af90774a0a208e5cab54a7f |
|
MD5 | f1474154130cee690b2cebd8b06a2698 |
|
BLAKE2b-256 | 7d4eedeb86ccf13da4ddb61a2469100c591f460123d2adb5d99ec2aa04e3e9a2 |