Skip to main content

Run a command within python

Project description

run-cmd

pytestpythonCode style: blackLicense: MITPyPI version

Run a command within python

Install it

pip install python-run-cmd
# pip install git+https://github.com/ffreemt/run-cmd
# poetry add git+https://github.com/ffreemt/run-cmd
# git clone https://github.com/ffreemt/run-cmd && cd run-cmd

Use it

from python_run_cmd import run_cmd

ret = run_cmd("ls -l")
if ret.returncode:
  print("Failed")
else:
  print("OK")

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

python_run_cmd-0.1.0a0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

python_run_cmd-0.1.0a0-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page