Skip to main content

QTerm is a Python module for spawning child applications and controlling them automatically

Project description

QTerm

QTerm is a Python module for spawning child applications and controlling them automatically.

Install

pip install qterm

Usage

To interract with a child process use QTerm class:

from qterm import QTerm

with QTerm() as term:
    print(term.exec('cd'))

In case command prompt pattern changes use temp_prompt method:

from qterm import QTerm, PYTHON

print(PYTHON)

with QTerm() as term:
    with term.temp_prompt(*PYTHON):
        print(term.exec('1+1'))

# TermArgs(SPAWN_COMMAND='python', PROMPT=re.compile('^>>> '), EXIT_COMMAND='exit()')
# ['2']

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

qterm-0.0.2.tar.gz (15.8 kB view hashes)

Uploaded Source

Built Distribution

qterm-0.0.2-py3-none-any.whl (16.4 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