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

Method __enter__

IPython/terminal/tests/test_interactivshell.py:71–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 self.ip = get_ipython()
70
71 def __enter__(self):
72 self.orig_prompt_for_code = self.ip.prompt_for_code
73 self.ip.prompt_for_code = self.fake_input
74 return self
75
76 def __exit__(self, etype, value, tb):
77 self.ip.prompt_for_code = self.orig_prompt_for_code

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected