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.1.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.1-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: shell_cmd-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 534ac07b84d26688db2ced3abc19fb6f69f82eb41c0772f9affde7e216c4901b
MD5 45612dc8a21531342c7b7fbf385bb5e6
BLAKE2b-256 922d000d5ac4fafaa36c4fd8201b6df473ea723a3c3a95420bfb1a012b17491a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shell_cmd-1.0.1-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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c4e1f11326a456067b5b9cb7d9cb0b88d7997c537c38b754b1db530c2f52c7b9
MD5 b1d673506727a3cd5f93f5830a4f072f
BLAKE2b-256 d611b6645f6d7a5f414c5a7ff0604598218a6f9e998b9ae754658ab38e9ce76b

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