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

Method auto_rewrite_input

IPython/core/interactiveshell.py:2594–2613  ·  view source on GitHub ↗

Print to the screen the rewritten form of the user's command. This shows visual feedback by rewriting input lines that cause automatic calling to kick in, like:: /f x into:: ------> f(x) after the user's input prompt. This helps the user unde

(self, cmd)

Source from the content-addressed store, hash-verified

2592 self.prefilter = self.prefilter_manager.prefilter_lines
2593
2594 def auto_rewrite_input(self, cmd):
2595 """Print to the screen the rewritten form of the user's command.
2596
2597 This shows visual feedback by rewriting input lines that cause
2598 automatic calling to kick in, like::
2599
2600 /f x
2601
2602 into::
2603
2604 ------> f(x)
2605
2606 after the user's input prompt. This helps the user understand that the
2607 input line was transformed automatically by IPython.
2608 """
2609 if not self.show_rewritten_input:
2610 return
2611
2612 # This is overridden in TerminalInteractiveShell to use fancy prompts
2613 print("------> " + cmd)
2614
2615 #-------------------------------------------------------------------------
2616 # Things related to extracting values/expressions from kernel and user_ns

Callers 1

handleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected