scrapy.utils.python: fixed bug introduced when adding support for new IPython 0.11. refs #335

This commit is contained in:
Pablo Hoffman 2011-08-09 01:38:31 -03:00
parent 061132ce88
commit 415933a1f6
1 changed files with 2 additions and 2 deletions

View File

@ -12,10 +12,10 @@ def start_python_console(namespace=None, noipython=False):
raise ImportError
import IPython
try:
shell = IPython.embed(user_ns=namespace)
IPython.embed(user_ns=namespace)
except AttributeError:
shell = IPython.Shell.IPShellEmbed(argv=[], user_ns=namespace)
shell()
shell()
except ImportError:
import code
try: # readline module is only available on unix systems