##// END OF EJS Templates
Merge pull request #861 from djv/master...
Fernando Perez -
r4979:db84fc9d merge
parent child Browse files
Show More
@@ -3207,11 +3207,15 b' Defaulting color scheme to \'NoColor\'"""'
3207 3207 from IPython.core import interactiveshell
3208 3208 print "Pasting code; enter '%s' alone on the line to stop." % sentinel
3209 3209 while True:
3210 l = self.shell.raw_input_original(':')
3211 if l == sentinel:
3210 try:
3211 l = self.shell.raw_input_original(':')
3212 if l == sentinel:
3213 return
3214 else:
3215 yield l
3216 except EOFError:
3217 print '<EOF>'
3212 3218 return
3213 else:
3214 yield l
3215 3219
3216 3220 def _strip_pasted_lines_for_code(self, raw_lines):
3217 3221 """ Strip non-code parts of a sequence of lines to return a block of
@@ -487,7 +487,7 b' class TerminalInteractiveShell(InteractiveShell):'
487 487 def magic_cpaste(self, parameter_s=''):
488 488 """Paste & execute a pre-formatted code block from clipboard.
489 489
490 You must terminate the block with '--' (two minus-signs) alone on the
490 You must terminate the block with '--' (two minus-signs) or Ctrl-D alone on the
491 491 line. You can also provide your own sentinel with '%paste -s %%' ('%%'
492 492 is the new sentinel for this operation)
493 493
General Comments 0
You need to be logged in to leave comments. Login now