當前位置: 首頁>>代碼示例>>Python>>正文


Python idlelib.RemoteDebugger類代碼示例

本文整理匯總了Python中idlelib.RemoteDebugger的典型用法代碼示例。如果您正苦於以下問題:Python RemoteDebugger類的具體用法?Python RemoteDebugger怎麽用?Python RemoteDebugger使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了RemoteDebugger類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: close_debugger

 def close_debugger(self):
     db = self.interp.getdebugger()
     if db:
         self.interp.setdebugger(None)
         db.close()
         if self.interp.rpcclt:
             RemoteDebugger.close_remote_debugger(self.interp.rpcclt)
         self.resetoutput()
         self.console.write("[DEBUG OFF]\n")
         sys.ps1 = ">>> "
         self.showprompt()
     self.set_debugger_indicator()
開發者ID:LinkedModernismProject,項目名稱:web_code,代碼行數:12,代碼來源:PyShell.py

示例2: restart_subprocess

 def restart_subprocess(self):
     if self.restarting:
         return self.rpcclt
     self.restarting = True
     # close only the subprocess debugger
     debug = self.getdebugger()
     if debug:
         try:
             # Only close subprocess debugger, don't unregister gui_adap!
             RemoteDebugger.close_subprocess_debugger(self.rpcclt)
         except:
             pass
     # Kill subprocess, spawn a new one, accept connection.
     self.rpcclt.close()
     self.unix_terminate()
     console = self.tkconsole
     was_executing = console.executing
     console.executing = False
     self.spawn_subprocess()
     try:
         self.rpcclt.accept()
     except socket.timeout as err:
         self.display_no_subprocess_error()
         return None
     self.transfer_path()
     # annotate restart in shell window and mark it
     console.text.delete("iomark", "end-1c")
     if was_executing:
         console.write('\n')
         console.showprompt()
     halfbar = ((int(console.width) - 16) // 2) * '='
     console.write(halfbar + ' RESTART ' + halfbar)
     console.text.mark_set("restart", "end-1c")
     console.text.mark_gravity("restart", "left")
     console.showprompt()
     # restart subprocess debugger
     if debug:
         # Restarted debugger connects to current instance of debug GUI
         gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
         # reload remote debugger breakpoints for all PyShellEditWindows
         debug.load_breakpoints()
     self.restarting = False
     return self.rpcclt
開發者ID:LinkedModernismProject,項目名稱:web_code,代碼行數:43,代碼來源:PyShell.py

示例3: open_debugger

 def open_debugger(self):
     if self.interp.rpcclt:
         dbg_gui = RemoteDebugger.start_remote_debugger(self.interp.rpcclt, self)
     else:
         dbg_gui = Debugger.Debugger(self)
     self.interp.setdebugger(dbg_gui)
     dbg_gui.load_breakpoints()
     sys.ps1 = "[DEBUG ON]\n>>> "
     self.showprompt()
     self.set_debugger_indicator()
開發者ID:,項目名稱:,代碼行數:10,代碼來源:

示例4: restart_subprocess

    def restart_subprocess(self, with_cwd = False):
        if self.restarting:
            return self.rpcclt
        else:
            self.restarting = True
            debug = self.getdebugger()
            if debug:
                try:
                    RemoteDebugger.close_subprocess_debugger(self.rpcclt)
                except:
                    pass

            self.rpcclt.close()
            self.unix_terminate()
            console = self.tkconsole
            was_executing = console.executing
            console.executing = False
            self.spawn_subprocess()
            try:
                self.rpcclt.accept()
            except socket.timeout as err:
                self.display_no_subprocess_error()
                return None

            self.transfer_path(with_cwd=with_cwd)
            console.stop_readline()
            console.text.delete('iomark', 'end-1c')
            if was_executing:
                console.write('\n')
                console.showprompt()
            halfbar = (int(console.width) - 16) // 2 * '='
            console.write(halfbar + ' RESTART ' + halfbar)
            console.text.mark_set('restart', 'end-1c')
            console.text.mark_gravity('restart', 'left')
            console.showprompt()
            if debug:
                gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
                debug.load_breakpoints()
            self.compile.compiler.flags = self.original_compiler_flags
            self.restarting = False
            return self.rpcclt
開發者ID:webiumsk,項目名稱:WOT-0.9.15-CT,代碼行數:41,代碼來源:pyshell.py

示例5: restart_subprocess

 def restart_subprocess(self):
     if self.restarting:
         return self.rpcclt
     self.restarting = True
     # close only the subprocess debugger
     debug = self.getdebugger()
     if debug:
         try:
             # Only close subprocess debugger, don't unregister gui_adap!
             RemoteDebugger.close_subprocess_debugger(self.rpcclt)
         except:
             pass
     # Kill subprocess, spawn a new one, accept connection.
     self.rpcclt.close()
     self.unix_terminate()
     console = self.tkconsole
     was_executing = console.executing
     console.executing = False
     self.spawn_subprocess()
     try:
         self.rpcclt.accept()
     except socket.timeout, err:
         self.display_no_subprocess_error()
         return None
開發者ID:jingyi2811,項目名稱:station-software,代碼行數:24,代碼來源:PyShell.py

示例6: start_the_debugger

 def start_the_debugger(self, gui_adap_oid):
     return RemoteDebugger.start_debugger(self.rpchandler, gui_adap_oid)
開發者ID:dr4ke616,項目名稱:custom_python,代碼行數:2,代碼來源:run.py

示例7: __request_interrupt

            return None
        self.transfer_path()
        # annotate restart in shell window and mark it
        console.text.delete("iomark", "end-1c")
        if was_executing:
            console.write("\n")
            console.showprompt()
        halfbar = ((int(console.width) - 16) // 2) * "="
        console.write(halfbar + " RESTART " + halfbar)
        console.text.mark_set("restart", "end-1c")
        console.text.mark_gravity("restart", "left")
        console.showprompt()
        # restart subprocess debugger
        if debug:
            # Restarted debugger connects to current instance of debug GUI
            gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
            # reload remote debugger breakpoints for all PyShellEditWindows
            debug.load_breakpoints()
        self.restarting = False
        return self.rpcclt

    def __request_interrupt(self):
        self.rpcclt.remotecall("exec", "interrupt_the_server", (), {})

    def interrupt_subprocess(self):
        threading.Thread(target=self.__request_interrupt).start()

    def kill_subprocess(self):
        try:
            self.rpcclt.close()
        except AttributeError:  # no socket
開發者ID:jingyi2811,項目名稱:station-software,代碼行數:31,代碼來源:PyShell.py


注:本文中的idlelib.RemoteDebugger類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。