(self)
Constructor.

        Imports IPython's embedded shell with separator lines removed.
Constructor.
Constructor .
def __init__(self):
        """Constructor.

        Imports IPython's embedded shell with separator lines removed."""
        Shell.__init__(self)
        ConsoleProgressBarMixin.__init__(self)

        # We cannot use IPShellEmbed here because generator expressions do not
        # work there (e.g., set(g.degree(x) for x in [1,2,3])) where g comes
        # from an external context
        import sys

        from IPython import __version__ as ipython_version

        self.ipython_version = ipython_version

        try:
            # IPython >= 0.11 supports this
            try:
                from IPython.terminal.ipapp import TerminalIPythonApp
            except ImportError:
                from IPython.frontend.terminal.ipapp import TerminalIPythonApp
            self._shell = TerminalIPythonApp.instance()
            sys.argv.append("--nosep")
        except ImportError:
            # IPython 0.10 and earlier
            import IPython.Shell

            self._shell = IPython.Shell.start()
            self._shell.IP.runsource("from igraph import *")
            sys.argv.append("-nosep")
def __init__ ( self ) : Shell . __init__ ( self ) ConsoleProgressBarMixin . __init__ ( self ) # We cannot use IPShellEmbed here because generator expressions do not # work there (e.g., set(g.degree(x) for x in [1,2,3])) where g comes # from an external context import sys from IPython import __version__ as ipython_version self . ipython_version = ipython_version try : # IPython >= 0.11 supports this try : from IPython . terminal . ipapp import TerminalIPythonApp except ImportError : from IPython . frontend . terminal . ipapp import TerminalIPythonApp self . _shell = TerminalIPythonApp . instance ( ) sys . argv . append ( "--nosep" ) except ImportError : # IPython 0.10 and earlier import IPython . Shell self . _shell = IPython . Shell . start ( ) self . _shell . IP . runsource ( "from igraph import *" ) sys . argv . append ( "-nosep" )