A few simple Python functions allow you to run shell commands from your Python code
Project description
Shello-world: run shell commands from your Python code via simple functions
A few simple Python functions allow you to run shell commands from your Python code
Why shello-world?
It isn't a big library or framework. If you want a quick solution, you could prefer shello-world.
Usage
Let's take a look at a simple example below
from shello_world import shell_execute, shell_run
# Both functions work similarly
# shell_run runs a command directly in your shell
# Change color to green
shell_run("color a")
# You will see executing ipconfig in your shell just like you'd enter it
ipconfig = shell_run("ipconfig")
# But the function doesn't return anything
print(ipconfig is None) # True
# shell_execute doesn't print executing in your shell by default
systeminfo = shell_execute("systeminfo") # This line doesn't print anything
# But it always returns result as a string
print(systeminfo.upper())
print(systeminfo.split())
Installation
You can install this library with pip install shello-world command.
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
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 shello_world-0.1.1.tar.gz.
File metadata
- Download URL: shello_world-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e2cc6e8a66ce9775811f032ee5a70e7ba2cda401376dfb4ff8867a12b91c9e3
|
|
| MD5 |
21f1f52d5c734a414eea1625362c233e
|
|
| BLAKE2b-256 |
fda32dcb893e5b1eda36312a44ce621ea5b9f82dae7ad60871c82428ecbafa5a
|
File details
Details for the file shello_world-0.1.1-py3-none-any.whl.
File metadata
- Download URL: shello_world-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90f28cd7a8ea4af6cda6c4d1f33510cb0095e2bb624efce5105275d133b991be
|
|
| MD5 |
8d0df118b39d52f6efc36476b04d91dc
|
|
| BLAKE2b-256 |
4eb4273640f8ff6db961927992a39aef27d0c2e1c1379127e6ab20c751eebb0c
|