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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shello_world-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 daf6049dae06af865bf73bc9526cf4575ea572cf0f77caf32708393a602af0e5
MD5 479834336be2ae4f29417242d0dfb390
BLAKE2b-256 bb5ee8897f6015cb6d114cc78a33fad16e8d7018baa06e16a72cf8c7295c4ecb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shello_world-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7f86bd6353d288d1bffd23acf4651cee2cc977c35ade522805e52f146cdac068
MD5 51e41927ba8716f246ffcfa9e8849519
BLAKE2b-256 19b6c7ea3185a7101c99c21bf4e41decafb93f6b0d9f33bb0e6beb7059fe8638

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