MCPcopy Index your code
hub / github.com/ipython/ipython / sh

Function sh

tools/toollib.py:26–32  ·  view source on GitHub ↗

Run system command in shell, raise SystemExit if it returns an error.

(cmd)

Source from the content-addressed store, hash-verified

24
25# Utility functions
26def sh(cmd):
27 """Run system command in shell, raise SystemExit if it returns an error."""
28 print("$", cmd)
29 stat = os.system(cmd)
30 #stat = 0 # Uncomment this and comment previous to run in debug mode
31 if stat:
32 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
33
34def get_ipdir():
35 """Get IPython directory from command line, or assume it's the one above."""

Callers 1

make_tarball.pyFile · 0.90

Calls 1

systemMethod · 0.80

Tested by

no test coverage detected