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

Function escaped_commands

IPython/core/inputtransformer.py:267–276  ·  view source on GitHub ↗

Transform escaped commands - %magic, !system, ?help + various autocalls.

(line)

Source from the content-addressed store, hash-verified

265
266@StatelessInputTransformer.wrap
267def escaped_commands(line):
268 """Transform escaped commands - %magic, !system, ?help + various autocalls.
269 """
270 if not line or line.isspace():
271 return line
272 lineinf = LineInfo(line)
273 if lineinf.esc not in tr:
274 return line
275
276 return tr[lineinf.esc](lineinf)
277
278_initial_space_re = re.compile(r'\s*')
279

Callers 1

__init__Method · 0.90

Calls 1

LineInfoClass · 0.90

Tested by

no test coverage detected