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.4.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.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shello_world-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 a143d8f660e6222e88707ffcbb9c6037ed844c0fe2d57812ff205de51d5dba86
MD5 f21f06cf2b9c727effd1ac96029c2c62
BLAKE2b-256 bb3417abd8b00b74754adcd17bbc455999260d3e295aec1622f6d5bf934d638e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shello_world-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0e6a8c4e53f794b85a8ad2a83f906928f0eac65096f4b1493d9378ed5314d33c
MD5 8a6c3806c17ff93561101a886d3cea9b
BLAKE2b-256 456ed392f8238b4bac78c4823f73f079aff1d1e81286f0d014f6ab39f256ea58

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