diff options
author | Just van Rossum <just@letterror.com> | 2003-05-09 08:33:58 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2003-05-09 08:33:58 (GMT) |
commit | 476736eed609ec7142a2c35a7c5fc9c15cffb03a (patch) | |
tree | 86d1c300eb04f7b738c4976d97397bf728a854e4 /Mac | |
parent | 5ef0e7cc472946d9562276768eb23d46e1226f07 (diff) | |
download | cpython-476736eed609ec7142a2c35a7c5fc9c15cffb03a.zip cpython-476736eed609ec7142a2c35a7c5fc9c15cffb03a.tar.gz cpython-476736eed609ec7142a2c35a7c5fc9c15cffb03a.tar.bz2 |
more dead code removal
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Tools/IDE/PyEdit.py | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py index aa71b2a..64463c6 100644 --- a/Mac/Tools/IDE/PyEdit.py +++ b/Mac/Tools/IDE/PyEdit.py @@ -108,8 +108,6 @@ class Editor(W.Window): self.run_as_main = self.settings.get("run_as_main", 0) self.run_with_interpreter = self.settings.get("run_with_interpreter", 0) self.run_with_cl_interpreter = self.settings.get("run_with_cl_interpreter", 0) - self._threadstate = (0, 0) - self._thread = None def readwindowsettings(self): try: @@ -506,15 +504,7 @@ class Editor(W.Window): self.runselbutton.push() def run(self): - if self._threadstate == (0, 0): - self._run() - else: - lock = Wthreading.Lock() - lock.acquire() - self._thread.postException(KeyboardInterrupt) - if self._thread.isBlocked(): - self._thread.start() - lock.release() + self._run() def _run(self): if self.run_with_interpreter: @@ -565,14 +555,7 @@ class Editor(W.Window): t.do_script(with_command=cmd) def runselection(self): - if self._threadstate == (0, 0): - self._runselection() - elif self._threadstate == (1, 1): - self._thread.block() - self.setthreadstate((1, 2)) - elif self._threadstate == (1, 2): - self._thread.start() - self.setthreadstate((1, 1)) + self._runselection() def _runselection(self): if self.run_with_interpreter or self.run_with_cl_interpreter: @@ -625,19 +608,6 @@ class Editor(W.Window): klass.__dict__.update(globals[classname].__dict__) globals[classname] = klass - def setthreadstate(self, state): - oldstate = self._threadstate - if oldstate[0] <> state[0]: - self.runbutton.settitle(runButtonLabels[state[0]]) - if oldstate[1] <> state[1]: - self.runselbutton.settitle(runSelButtonLabels[state[1]]) - self._threadstate = state - - def _exec_threadwrapper(self, *args, **kwargs): - apply(execstring, args, kwargs) - self.setthreadstate((0, 0)) - self._thread = None - def execstring(self, pytext, globals, locals, file, modname): tracebackwindow.hide() # update windows |