Fix IPython.Shell compatibility layer #286

astrofrog opened this Issue Mar 4, 2011 · 5 comments


None yet

4 participants


It looks like there is supposed to be a compatibility layer for IPython.Shell but it is not working:

Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import IPython.Shell
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Shell

and trying to execute the import statement from gives:

>>> from IPython.core.embed import InteractiveShellEmbed as IPShellEmbed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named embed

What is the most up-to-date way to access IPython.Shell?


There is no compatibility layer. has moved to IPython.deathrow.Shell and should not be used. InteractiveShellEmbed has moved to IPython.frontend.terminal.embed.InteractiveShellEmbed, although I recommend using the embed() function in that module.


Thanks - are there any replacements for the following?


The way I understand it you should now be able to simply start a console by

import IPython

However, this raises

TraitError: The 'exit_msg' trait of an InteractiveShellEmbed instance must be a string, but a value of u'' was specified.

If we pass a string for exit_msg by


Then it raises a different error

AttributeError: 'InteractiveShellEmbed' object has no attribute 'set_completer'

Am I missing something here? I am using Python 2.6.1. Thanks a lot.



import IPython.Shell


import IPython

on /opt/local/bin/ipython

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment