Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythonsimpleshell-0.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonsimpleshell-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file pythonsimpleshell-0.0.1.tar.gz.

File metadata

  • Download URL: pythonsimpleshell-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

Hashes for pythonsimpleshell-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9180aa29d6d0ee8d5d3e4606d29c2079290b8985de976adffc113a1fe4111376
MD5 d6f1e8f76d5e3ec0db6db86feb76221e
BLAKE2b-256 f971d13a8588a10c45e443284925fed0c5631736eb3494477ced866da321a2fc

See more details on using hashes here.

File details

Details for the file pythonsimpleshell-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pythonsimpleshell-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

Hashes for pythonsimpleshell-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db893a32635261b1c10af502a04a200abd19d6a114ca8513a4347adff9b22de2
MD5 08f9d123a96914c6df7985418500d6a1
BLAKE2b-256 bf3e7ba62488d91f3af543ee819a0152d7909ff14802b25ebc8036ce1da8e862

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page