Automate interactive CLI tools actions
Project description
pexpect-executor
Automate interactive CLI tools actions to create previews or tests in Python.
Examples
#!/usr/bin/env python3
# Modules libraries
from pexpect_executor import Executor
# Configure
Executor.configure(host='previews', tool='pexpect-executor')
# List
Executor('ls -la', workdir='/').\
read().\
finish()
# More
Executor('ls -la | more -5', workdir='/').\
read().\
wait(0.5).\
press('s').\
read().\
wait(0.5).\
press('s').\
read().\
wait(0.5).\
press('b').\
read().\
wait(0.2).\
press('b').\
read().\
wait(0.2).\
press(' ').\
read().\
wait(1).\
press(Executor.KEY_ENTER).\
read().\
wait(1).\
press('q').\
finish()
# Prompt
Executor('').\
finish()
Dependencies
- pexpect: Interactive console applications controller
References
- gitlabci-local: Launch .gitlab-ci.yml jobs locally
- peek: Simple GIF screen recorder
- PyPI: The Python Package Index
- twine: Utility for publishing on PyPI
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pexpect_executor-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26828c13670eecb322d87e8b6c9118f07151249c74f51eb14ae52fe22d71d900 |
|
MD5 | 9ae173a1bf6e31e8cc3190fbd3153ad6 |
|
BLAKE2b-256 | ae72903cd740394a8f599cb0997693aa7b80e78621f7ea29fc0ca685a048654a |