MCPcopy Create free account
hub / github.com/ipython/ipython / sh

Function sh

tools/toollib.py:27–33  ·  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

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

Callers 2

make_tarball.pyFile · 0.90
buildwheelsFunction · 0.85

Calls 1

systemMethod · 0.80

Tested by

no test coverage detected