use OS terminal
Project description
cli_sender
Designed to send commands into OS terminal
Features
- send commands into OS terminal
- check if cli commands are accessible (special utilities is installed)
- access to standard parts of result in a simple ready-to-use form (stdout/stderr/retcode/full state)
- use batch timeout for list
- till_first_true
- counter/counter_in_list
License
See the LICENSE file for license rights and limitations (MIT).
Release history
See the HISTORY.md file for release history.
Installation
pip install cli-user
Import
from cli_user import *
GUIDE
USAGE
from cli_user import *
victim = CliUser()
cmd_line = "ping localhost"
victim.send(cmd_line, timeout=0.1)
victim.print_state()
"""
==================================================
self.last_cmd='ping -n 1 localhost'
self.last_finished_success=True
self.last_finished=True
self.last_retcode=0
--------------------------------------------------
self.last_stdout=
###STDOUT PING!!!
--------------------------------------------------
self.last_stderr=
--------------------------------------------------
self._last_exx_timeout=None
==================================================
"""
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
cli_user-0.0.5.tar.gz
(5.7 kB
view hashes)