Skip to main content

Execute terminal commands from Python easily.

Project description

terminalExecutepy

terminalExecutepy is a lightweight Python utility for executing terminal or shell commands directly from Python with clean output handling and optional error management. It simplifies subprocess usage and provides a straightforward API for running commands programmatically across Windows, macOS, and Linux.


Features

  • Execute terminal commands with a single function call.
  • Capture output, errors, and return codes.
  • Cross‑platform support.
  • No external dependencies.
  • Ideal for automation, scripting, and CLI tool integration.

Installation

Install from PyPI:

pip install terminalExecutepy

Or install it from source:

pip install git+https://github.com/ahk4918/terminalExecutepy.git

Usage:

Basic example:

from terminalExecutepy import terminalExecute

result = terminalExecute("echo Hello World")
print(result.output)

Example with error handling

from terminalExecutepy import terminalExecute

cmd = "dir"  # or 'ls' on Linux/macOS
result = terminalExecute(cmd)

if result.success:
    print("Command output:")
    print(result.output)
else:
    print("Command failed:")
    print(result.error)

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

terminalexecute-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

terminalexecute-1.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file terminalexecute-1.0.0.tar.gz.

File metadata

  • Download URL: terminalexecute-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for terminalexecute-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ea7cdd004f9d5020e52dc0808b697ff837605ef3ec4c28c7373cc767bd866c11
MD5 a921a83acf6bdd3a3e57dbecabd0e115
BLAKE2b-256 a2f29612aa34a9ad00d24e88b7ae7e066350e7ae53dfced5d834f2fc0b43168d

See more details on using hashes here.

Provenance

The following attestation bundles were made for terminalexecute-1.0.0.tar.gz:

Publisher: terminalExecute.yml on ahk4918/terminalExecutepy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file terminalexecute-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for terminalexecute-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3de928ee50907e9db37c57e306658ca9bbd522aa3802ad23dc7e367a42012f
MD5 7605a26dac6aad1c97f8589b5d1bf731
BLAKE2b-256 c66c8e27399077fa35dbefc889cbc54bdb5c83844784d1ecf3f25de1e945a8da

See more details on using hashes here.

Provenance

The following attestation bundles were made for terminalexecute-1.0.0-py3-none-any.whl:

Publisher: terminalExecute.yml on ahk4918/terminalExecutepy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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