Skip to content

Instantly share code, notes, and snippets.

@ogra
Created August 2, 2011 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ogra/1120987 to your computer and use it in GitHub Desktop.
Save ogra/1120987 to your computer and use it in GitHub Desktop.
Scrapy 0.12.0.2543 scrapy/utils/console.py patch for IPython 0.11
--- console.py.orig 2011-07-31 08:01:34.000000000 +0000
+++ console.py 2011-08-02 20:38:56.000000000 +0000
@@ -11,7 +11,10 @@
if noipython:
raise ImportError
import IPython
- shell = IPython.Shell.IPShellEmbed(argv=[], user_ns=namespace)
+ if IPython.__version__ == '0.11':
+ shell = IPython.embed(user_ns=namespace)
+ else:
+ shell = IPython.Shell.IPShellEmbed(argv=[], user_ns=namespace)
shell()
except ImportError:
import code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment