Skip to content

Instantly share code, notes, and snippets.

@munhitsu
Created November 28, 2012 17:15
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 munhitsu/4162619 to your computer and use it in GitHub Desktop.
Save munhitsu/4162619 to your computer and use it in GitHub Desktop.
ipython within lettuce context
# from: http://matelakat.blogspot.co.uk/2012/03/lettuce-and-ipython-interactive-shell.html
#
@step(u'And give me IPython')
def and_continue_here(step):
import IPython
import sys
shell = IPython.InteractiveShell()
ip = IPython.core.ipapi.get()
p = IPython.core.debugger.Pdb(ip.colors)
p.reset()
p.interaction(sys._getframe(0), None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment