Mercurial > public > bitcaviar
view src/pybitcoin/helpers.py @ 0:32ce869b7f82
initial commit
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Thu, 07 Oct 2021 10:21:21 +0200 |
parents | |
children | f45c3c4f9932 |
line wrap: on
line source
"""Helper functions""" import subprocess def run(command): """ Execute shell command :param command: string, required :return: string """ output = subprocess.run(command, capture_output=True, text=True) if output.returncode != 0: # An error occurred return 'error: ' + output.stderr else: return output.stdout