Skip to main content

A package which allows making bash style command line scripts easier.

Project description

Python Bash Utils

Author: Tim Santor


Bash color management and log system for Python users.


  • Python 2.7.x, 3.6.x


You can install directly via pip:

pip install python-bash-utils




from bashutils import logmsg


logmsg.divline()             # ----------
logmsg.header('header')      # ==> header
logmsg.success('success')    # [OK] success
logmsg.error('error')        # [ERROR] error
logmsg.warning('warning')    # [WARNING] warning'info')          # [INFO] info
logmsg.note('note')          # note

logmsg.prompt('What is your name?)  # [?] What is your name?
lomgsg.confirm('Confirm this')  # [?] Confirm this? (y/n)



from bashutils import bashutils


bashutils.get_os() # OSX, 'Fedora', 'CentOS', 'Debian', 'Ubuntu'

status, stdout, stderr = bashutils.exec_cmd('git -h')

bashutils.cmd_exists('git') # True or False

Version History

  • 0.1.0 - Initial release
  • 0.1.1 - Added some new methods
  • 0.1.2 - Refactor
  • 0.1.3 - Added Python 3.4.x support
  • 0.1.4 - Added ability to pass logger instance to log message as well
  • 0.1.5 - Added Windows output workaround
  • 0.1.6 - Removed needless declined method, was being overly verbose in output
  • 0.2.0 - Updated for Python 3
  • 0.3.0 - Simplified code base and now rely on colorama for cross-platform terminal color support
  • 0.3.1 - Added cooler icons for success/error for Linux/Mac
  • 0.3.2 - Remove unicode chars that cause issues when writing to file


If you experience any issues, please create an issue on Bitbucket.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Python-Bash-Utils, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size python_bash_utils-0.3.2-py2.py3-none-any.whl (4.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size python-bash-utils-0.3.2.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page