##// END OF EJS Templates
Minor updates to reflect comments
mr.Shu -
Show More
@@ -150,7 +150,6 b' class TerminalMagics(Magics):'
150 150 def store_or_execute(self, block, name):
151 151 """ Execute a block, or store it in a variable, per the user's request.
152 152 """
153 self.shell.using_magics = True
154 153
155 154 b = self.cleanup_input(block)
156 155 if name:
@@ -159,7 +158,9 b' class TerminalMagics(Magics):'
159 158 print("Block assigned to '%s'" % name)
160 159 else:
161 160 self.shell.user_ns['pasted_block'] = b
161 self.shell.using_paste_magics = True
162 162 self.shell.run_cell(b)
163 self.shell.using_paste_magics = True
163 164
164 165 def rerun_pasted(self, name='pasted_block'):
165 166 """ Rerun a previously pasted command.
@@ -349,8 +350,10 b' class TerminalInteractiveShell(InteractiveShell):'
349 350 term_title = CBool(False, config=True,
350 351 help="Enable auto setting the terminal title."
351 352 )
352
353 using_magics = CBool(False)
353
354 # This `using_paste_magics` is used to detect whether the code is being
355 # executed via paste magics functions
356 using_paste_magics = CBool(False)
354 357
355 358 # In the terminal, GUI control is done via PyOS_InputHook
356 359 from IPython.lib.inputhook import enable_gui
General Comments 0
You need to be logged in to leave comments. Login now