Skip to main content

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.

Links

PyPI
GitHub

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

shello_world-0.1.3.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

shello_world-0.1.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file shello_world-0.1.3.tar.gz.

File metadata

  • Download URL: shello_world-0.1.3.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

Hashes for shello_world-0.1.3.tar.gz
Algorithm Hash digest
SHA256 63642602a2c1196352c8f05682bd98cd1666f0b21a738ebe11c2a72d30f4a1ed
MD5 9ec636f647a67d39c316d764a0aec5c3
BLAKE2b-256 524fee7a0f6104386fbb6e49518d22229f341fba6f0650f84c8654a34db01a80

See more details on using hashes here.

File details

Details for the file shello_world-0.1.3-py3-none-any.whl.

File metadata

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

Hashes for shello_world-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dfaad2f8fc61c4df51b2e82891599bc50de4f503ff3fde76efd9a2fd6bdea72c
MD5 8bfc78f2f144cb10051c1b4d2b88979b
BLAKE2b-256 c016e0e55ce3aff39e3f1afbdbed599015a421a21e515ebf0c4152d6b986157b

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