Skip to main content

A simple windows command line interface wrapper for use with cli's

Project description

CmdInterface Class Documentation

Overview

The CmdInterface class provides a robust Python interface for interacting with command-line processes in Windows. It is designed to encapsulate command sending and output handling of a single terminal into a simple and clean API that can be easily integrated into larger applications.

Features

  • Live Context: Changes in the terminal context by a command persist and the terminal is kept alive.
  • Multiple Instances: Launching Multiple Instances at the same time does not create interference.
  • Command Isolation: Ensures that commands sent through the interface are not executed at the same time if sent to the same instance, and outputs are cleanly separated.
  • Boilerplate Removal: Automatically handles removal of unnecessary startup text from command outputs.
  • Logging Capability: Offers optional logging of all commands and outputs for debugging and auditing purposes.
  • Safe Cleanup: Automatically manages subprocess termination to prevent resource leaks.

Usage

Instantiation

Create an instance of the CmdInterface with optional configurations:

from CmdInterface import CmdInterface

cmd_interface = CmdInterface(nude=True, rm_boilerplate=True, end_signal="END_OF_OUTPUT", log_mode=False)

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

simplecmdinterface-0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

simplecmdinterface-0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file simplecmdinterface-0.1.tar.gz.

File metadata

  • Download URL: simplecmdinterface-0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for simplecmdinterface-0.1.tar.gz
Algorithm Hash digest
SHA256 211bdba46d8e82234a4a0ec9a9d1365e1c18753d5d3a858eb43fedabae94fc38
MD5 d1f7cbf373a0c609536c6d29723268cb
BLAKE2b-256 ba2720167fd8064882f8cdcee201521011c94878f6f97a78c90e023de821c112

See more details on using hashes here.

File details

Details for the file simplecmdinterface-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simplecmdinterface-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2bd9f9dd8b5f8f64249e5e2989790d8578ad84884c4e528465d1efdacc95a961
MD5 02f80d704b44b29b909a4b45d3c3179a
BLAKE2b-256 1beab808a95049174036191db783730a02f471479301ce38fa9177befadcda7d

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