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

Method _prompt

IPython/terminal/debugger.py:93–102  ·  view source on GitHub ↗

In case other prompt_toolkit apps have to run in parallel to this one (e.g. in madbg), create_app_session must be used to prevent mixing up between them. According to the prompt_toolkit docs: > If you need multiple applications running at the same time, you have to create a

(self)

Source from the content-addressed store, hash-verified

91 self.pt_app = PromptSession(**options)
92
93 def _prompt(self):
94 """
95 In case other prompt_toolkit apps have to run in parallel to this one (e.g. in madbg),
96 create_app_session must be used to prevent mixing up between them. According to the prompt_toolkit docs:
97
98 > If you need multiple applications running at the same time, you have to create a separate
99 > `AppSession` using a `with create_app_session():` block.
100 """
101 with create_app_session():
102 return self.pt_app.prompt()
103
104 def cmdloop(self, intro=None):
105 """Repeatedly issue a prompt, accept input, parse an initial prefix

Callers

nothing calls this directly

Calls 1

promptMethod · 0.80

Tested by

no test coverage detected