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

Function xsys

IPython/testing/globalipapp.py:34–40  ·  view source on GitHub ↗

Replace the default system call with a capturing one for doctest.

(self, cmd)

Source from the content-addressed store, hash-verified

32# various types of output there otherwise it will miss them).
33
34def xsys(self, cmd):
35 """Replace the default system call with a capturing one for doctest.
36 """
37 # We use getoutput, but we need to strip it because pexpect captures
38 # the trailing newline differently from commands.getoutput
39 print(self.getoutput(cmd, split=False, depth=1).rstrip(), end='', file=sys.stdout)
40 sys.stdout.flush()
41
42
43def _showtraceback(self, etype, evalue, stb):

Callers

nothing calls this directly

Calls 2

getoutputMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…