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
Release history Release notifications | RSS feed
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)
Built Distribution
qterm-0.0.2-py3-none-any.whl
(16.4 kB
view hashes)