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

Function get_ipdir

tools/toollib.py:35–46  ·  view source on GitHub ↗

Get IPython directory from command line, or assume it's the one above.

()

Source from the content-addressed store, hash-verified

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."""
37
38 # Initialize arguments and check location
39 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
40
41 ipdir = os.path.abspath(ipdir)
42
43 cd(ipdir)
44 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
45 raise SystemExit('Invalid ipython directory: %s' % ipdir)
46 return ipdir
47
48def execfile(fname, globs, locs=None):
49 locs = locs or globs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected