def sh(cmd):
    print("$", cmd)
    stat = os.system(cmd)
    #stat = 0  # Uncomment this and comment previous to run in debug mode
    if stat:
        raise SystemExit("Command %s failed with code: %s" % (cmd, stat))

# Backwards compatibility
Run system command in shell, raise SystemExit if it returns an error.
dataset/ETHPy150Open ipython/ipython-py3k/tools/toollib.py/sh