Exemplo n.º 1
0
 def handle(self):
     """Override base method"""
     executive = Executive(self)
     self.register('exec', executive)
     self.console = self.get_remote_proxy('console')
     sys.stdin = PyShell.PseudoInputFile(self.console, 'stdin', IOBinding.encoding)
     sys.stdout = PyShell.PseudoOutputFile(self.console, 'stdout', IOBinding.encoding)
     sys.stderr = PyShell.PseudoOutputFile(self.console, 'stderr', IOBinding.encoding)
     self._keep_stdin = sys.stdin
     self.interp = self.get_remote_proxy('interp')
     rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
     return
Exemplo n.º 2
0
    def handle(self):
        """Override base method"""
        executive = Executive(self)
        self.register("exec", executive)
        self.console = self.get_remote_proxy("console")
        sys.stdin = PyShell.PseudoInputFile(self.console, "stdin",
                                            IOBinding.encoding)
        sys.stdout = PyShell.PseudoOutputFile(self.console, "stdout",
                                              IOBinding.encoding)
        sys.stderr = PyShell.PseudoOutputFile(self.console, "stderr",
                                              IOBinding.encoding)

        # page help() text to shell.
        import pydoc  # import must be done here to capture i/o binding
        pydoc.pager = pydoc.plainpager
        self.interp = self.get_remote_proxy("interp")
        rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
Exemplo n.º 3
0
Arquivo: run.py Projeto: thaolt/v0.83
    def handle(self):
        """Override base method"""
        executive = Executive(self)
        self.register("exec", executive)
        self.console = self.get_remote_proxy("console")
        sys.stdin = PyShell.PseudoInputFile(self.console, "stdin",
                                            IOBinding.encoding)
        sys.stdout = PyShell.PseudoOutputFile(self.console, "stdout",
                                              IOBinding.encoding)
        sys.stderr = PyShell.PseudoOutputFile(self.console, "stderr",
                                              IOBinding.encoding)

        # Keep a reference to stdin so that it won't try to exit IDLE if
        # sys.stdin gets changed from within IDLE's shell. See issue17838.
        self._keep_stdin = sys.stdin

        self.interp = self.get_remote_proxy("interp")
        rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
Exemplo n.º 4
0
    def handle(self):
        """Override base method"""
        executive = Executive(self)
        self.register("exec", executive)
        self.console = self.get_remote_proxy("console")
        sys.stdin = PyShell.PseudoInputFile(self.console, "stdin",
                                            IOBinding.encoding)
        sys.stdout = PyShell.PseudoOutputFile(self.console, "stdout",
                                              IOBinding.encoding)
        sys.stderr = PyShell.PseudoOutputFile(self.console, "stderr",
                                              IOBinding.encoding)

        sys.displayhook = rpc.displayhook
        # page help() text to shell.
        import pydoc  # import must be done here to capture i/o binding
        pydoc.pager = pydoc.plainpager

        # Keep a reference to stdin so that it won't try to exit IDLE if
        # sys.stdin gets changed from within IDLE's shell. See issue17838.
        self._keep_stdin = sys.stdin

        self.interp = self.get_remote_proxy("interp")
        rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)