#!/usr/bin/env python
"""Terminal-based IPython entry point.
"""

from IPython.frontend.terminal.ipapp import launch_new_instance

try:
  launch_new_instance()
except ImportError as e:
  if "qt.console.qtconsoleapp" in e.message:
    print "Could not start qtconsole. Please install ipython-qtconsole"
  elif "html.notebook.notebookapp" in e.message:
    print "Could not start notebook. Please install ipython-notebook"
  else:
    # if there is no clue on the cause -- just re-raise
    raise
