Permalink
Browse files

Add example for %cpaste

  • Loading branch information...
1 parent 62ead75 commit a2d9aa20c0f1cf170cc16a7e8eaa9289f9af1e29 @sathya5562 sathya5562 committed with Feb 15, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 IPython/frontend/terminal/interactiveshell.py
@@ -545,6 +545,17 @@ def magic_cpaste(self, parameter_s=''):
See also
--------
paste: automatically pull code from clipboard.
+
+ Examples
+ --------
+ ::
+
+ In [8]: %cpaste
+ Pasting code; enter '--' alone on the line to stop.
+ :>>> a = ["world!", "Hello"]
+ :>>> print " ".join(sorted(a))
+ :--
+ Hello world!
"""
opts,args = self.parse_options(parameter_s,'rs:',mode='string')

0 comments on commit a2d9aa2

Please sign in to comment.