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 pythonsimpleshell-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db893a32635261b1c10af502a04a200abd19d6a114ca8513a4347adff9b22de2 |
|
MD5 | 08f9d123a96914c6df7985418500d6a1 |
|
BLAKE2b-256 | bf3e7ba62488d91f3af543ee819a0152d7909ff14802b25ebc8036ce1da8e862 |