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

Method __init__

IPython/testing/ipunittest.py:61–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 implementation, but for now it only does prompt conversion."""
60
61 def __init__(self):
62 self.rps1 = re.compile(r'In\ \[\d+\]: ')
63 self.rps2 = re.compile(r'\ \ \ \.\.\.+: ')
64 self.rout = re.compile(r'Out\[\d+\]: \s*?\n?')
65 self.pyps1 = '>>> '
66 self.pyps2 = '... '
67 self.rpyps1 = re.compile (r'(\s*%s)(.*)$' % self.pyps1)
68 self.rpyps2 = re.compile (r'(\s*%s)(.*)$' % self.pyps2)
69
70 def __call__(self, ds):
71 """Convert IPython prompts to python ones in a string."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected