(self)
Constructor.

        Imports IDLE's embedded shell. The implementation of this method is
        ripped from idlelib.PyShell.main() after removing the unnecessary
        parts.
Constructor.
Constructor .
def __init__(self):
        """Constructor.

        Imports IDLE's embedded shell. The implementation of this method is
        ripped from idlelib.PyShell.main() after removing the unnecessary
        parts."""
        Shell.__init__(self)

        import idlelib.PyShell

        idlelib.PyShell.use_subprocess = True

        try:
            sys.ps1
        except AttributeError:
            sys.ps1 = ">>> "

        root = idlelib.PyShell.Tk(className="Idle")
        idlelib.PyShell.fixwordbreaks(root)
        root.withdraw()
        flist = idlelib.PyShell.PyShellFileList(root)
        if not flist.open_shell():
            raise NotImplementedError
        self._shell = flist.pyshell
        self._root = root
def __init__ ( self ) : Shell . __init__ ( self ) import idlelib . PyShell idlelib . PyShell . use_subprocess = True try : sys . ps1 except AttributeError : sys . ps1 = ">>> " root = idlelib . PyShell . Tk ( className = "Idle" ) idlelib . PyShell . fixwordbreaks ( root ) root . withdraw ( ) flist = idlelib . PyShell . PyShellFileList ( root ) if not flist . open_shell ( ) : raise NotImplementedError self . _shell = flist . pyshell self . _root = root