Skip to content

Instantly share code, notes, and snippets.

@gknoy
Created July 8, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gknoy/97de793db43ff7ea4d4bfd1bab96b408 to your computer and use it in GitHub Desktop.
Save gknoy/97de793db43ff7ea4d4bfd1bab96b408 to your computer and use it in GitHub Desktop.
# paste directly into console
In [2]: class Sample:
...:
...: def __init__(self):
...: print('hehe')
...:
In [3]: s = Sample()
hehe
# using %cpaste
In [5]: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:class Sample:
: def __init__(self):
: print('hehe')
:
:s = Sample()
:<EOF>
hehe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment