Skip to main content

Execute shell commands

Project description

shell-cmd Python package

Simple wrapper for executing shell commands using just one Python function.

Installation

$ pip install shell_cmd

Example

from shell_cmd import sh


# Printing output
print(sh("ls -l"))

# Getting output in a list
ll = sh("ls -l", True)

If error happens during the execution of the shell command, then RunShellException custom exception is raised.

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

shell_cmd-1.0.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

shell_cmd-1.0.2-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file shell_cmd-1.0.2.tar.gz.

File metadata

  • Download URL: shell_cmd-1.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for shell_cmd-1.0.2.tar.gz
Algorithm Hash digest
SHA256 84bcd82226015029ee1e9c7d71968d4028843b194e5bf2689a5d0c18ed2dbb0b
MD5 1d2032af8cdc61e07d3aa34bf4773e13
BLAKE2b-256 aac7a0563c7ff5c2437584ecb9114b18c639d19bebbdd11db2efce67b99aee03

See more details on using hashes here.

File details

Details for the file shell_cmd-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: shell_cmd-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for shell_cmd-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fde253563eecf9981a5add91440f0438781e767d28e796e32387e73f7fad081c
MD5 94c3f30c38c84897c97a6db49e63805e
BLAKE2b-256 6212d95b379630a3e20072b7af40abf6ea10cd571d48cd94a73683f9ec815d2b

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