https://github.com/zackees/shellexecute
Executes a command, allows confirmation to be sent using p/wexpect
https://github.com/zackees/shellexecute
Last synced: 4 months ago
JSON representation
Executes a command, allows confirmation to be sent using p/wexpect
- Host: GitHub
- URL: https://github.com/zackees/shellexecute
- Owner: zackees
- License: mit
- Created: 2023-02-04T01:31:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-16T02:11:05.000Z (4 months ago)
- Last Synced: 2025-03-16T03:19:48.039Z (4 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shellexecute
[](../../actions/workflows/lint.yml)
[](../../actions/workflows/push_macos.yml)
[](../../actions/workflows/push_ubuntu.yml)
[](../../actions/workflows/push_win.yml)`pip install shellexecute`
```python
from shellexecute import execute
rtn = execute(
f"echo HI",
send_confirmation=[("HI", "y")],
)
```Cross platform way to run shell commands using pexpect (wexpect on windows). VERY useful for installers where
you want to automate accepting prompts.To develop software, run `. ./activate.sh`
# Windows
This environment requires you to use `git-bash`.
# Linting
Run `./lint.sh` to find linting errors using `pylint`, `flake8` and `mypy`.
# Versions
* 1.0.5: Fix coloram issue in non windows builds.
* 1.0.4: Timeout is now set to None by default.