def ipython_mode(use_notebook=True):
    """Selects whether the IPython notebook should be used.

    Call ``vistrails.ipython_mode(True)`` to enable IPythonMode for output
    modules, directing supported output to the notebook instead of files.
    """
    if use_notebook:
        try:
            import IPython.core.display
        except __HOLE__:
            raise ValueError("IPython doesn't seem to be installed!?")

    from vistrails.core.modules.output_modules import IPythonMode
    IPythonMode.notebook_override = use_notebook
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/api.py/ipython_mode