我们从Python开源项目中,提取了以下23个代码示例,用于说明如何使用thread.run_locally_no_report()。
def run_on_thread_no_report(self, text, cur_frame, frame_kind): self._block_starting_lock.acquire() if not self._is_blocked: pass elif not self._is_working: self.schedule_work(lambda : self.run_locally_no_report(text, cur_frame, frame_kind)) else: pass self._block_starting_lock.release()
def run_locally_no_report(self, text, cur_frame, frame_kind): code = self.compile(text, cur_frame) res = eval(code, cur_frame.f_globals, self.get_locals(cur_frame, frame_kind)) self.locals_to_fast(cur_frame) sys.displayhook(res)
def execute_code_no_report(self, text, tid, fid, frame_kind): # execute given text in specified frame, without sending back the results thread, cur_frame = self.get_thread_and_frame(tid, fid, frame_kind) if thread is not None and cur_frame is not None: thread.run_locally_no_report(text, cur_frame, frame_kind)