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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: shello_world-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2566cfad598e8b5e0d74c2aae8d231986bae6f8ef909f0333d7d1d224e194eb6
MD5 f4aed71fef1326f9068c6e72ef21e2a9
BLAKE2b-256 751fbd6a2fdf28d95d997eafb02e6058932d0b9c87d143b3fc6e63ac0cadf779

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shello_world-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f1f27f45a973f78e83aff0745e6fdc164ad3575cc9ce315831e88efbf2217c7
MD5 7edae55ec0b3ddd091527a43c611edcb
BLAKE2b-256 946a1337fe59e94e4cc31ff15d1ed46d830b25f302b44a020c0773afb6335039

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