A package which allows making bash style command line scripts easier.
Author: Tim Santor tsantor@xstudios.agency
Bash color management and log system for Python users.
You can install directly via pip:
pip install python-bash-utils
Import:
from bashutils import logmsg
Functions:
logmsg.divline() # ----------
logmsg.header('header') # ==> header
logmsg.success('success') # [+] success
logmsg.error('error') # [-] error
logmsg.warning('warning') # [!] warning
logmsg.info('info') # [i] info
logmsg.note('note') # note
logmsg.prompt('What is your name?) # [?] What is your name?
lomgsg.confirm('Confirm this') # [?] Confirm this? (y/n)
Import:
from bashutils import bashutils
Functions:
bashutils.get_os() # OSX, 'Fedora', 'CentOS', 'Debian', 'Ubuntu'
status, stdout, stderr = bashutils.exec_cmd('git -h')
bashutils.cmd_exists('git') # True or False
declined method, was being overly verbose in outputcolorama for cross-platform terminal color supportIf you experience any issues, please create an issue on Bitbucket.