cpython: d50d661a08f5 (original) (raw)
Mercurial > cpython
changeset 96069:d50d661a08f5 2.7
Issue #23184: idlelib, remove more unused names and imports. [#23184]
Terry Jan Reedy tjreedy@udel.edu | |
---|---|
date | Fri, 15 May 2015 23:03:11 -0400 |
parents | 81c3a75e0307 |
children | 8875d7c6a99d |
files | Lib/idlelib/EditorWindow.py Lib/idlelib/PyShell.py Lib/idlelib/RemoteDebugger.py Lib/idlelib/macosxSupport.py Lib/idlelib/run.py |
diffstat | 5 files changed, 10 insertions(+), 18 deletions(-)[+] [-] Lib/idlelib/EditorWindow.py 2 Lib/idlelib/PyShell.py 19 Lib/idlelib/RemoteDebugger.py 2 Lib/idlelib/macosxSupport.py 4 Lib/idlelib/run.py 1 |
line wrap: on
line diff
--- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -9,7 +9,6 @@ import tkMessageBox import webbrowser from idlelib.MultiCall import MultiCallCreator -from idlelib import idlever from idlelib import WindowList from idlelib import SearchDialog from idlelib import GrepDialog @@ -154,7 +153,6 @@ class EditorWindow(object): EditorWindow.help_url = 'file://' + EditorWindow.help_url else: EditorWindow.help_url = "https://docs.python.org/%d.%d/" % sys.version_info[:2]
currentTheme=idleConf.CurrentTheme()[](#l1.15) self.flist = flist[](#l1.16) root = root or flist.root[](#l1.17) self.root = root[](#l1.18)
--- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -10,8 +10,6 @@ import re import socket import time import threading -import traceback -import types import io import linecache @@ -32,7 +30,6 @@ from idlelib.ColorDelegator import Color from idlelib.UndoDelegator import UndoDelegator from idlelib.OutputWindow import OutputWindow from idlelib.configHandler import idleConf -from idlelib import idlever from idlelib import rpc from idlelib import Debugger from idlelib import RemoteDebugger @@ -171,7 +168,7 @@ class PyShellEditorWindow(EditorWindow): filename = self.io.filename text.tag_add("BREAK", "%d.0" % lineno, "%d.0" % (lineno+1)) try:
i = self.breakpoints.index(lineno)[](#l2.24)
self.breakpoints.index(lineno)[](#l2.25) except ValueError: # only add if missing, i.e. do once[](#l2.26) self.breakpoints.append(lineno)[](#l2.27) try: # update the subprocess debugger[](#l2.28)
@@ -439,7 +436,7 @@ class ModifiedInterpreter(InteractiveInt try: self.rpcclt = MyRPCClient(addr) break
except socket.error as err:[](#l2.33)
except socket.error:[](#l2.34) pass[](#l2.35) else:[](#l2.36) self.display_port_binding_error()[](#l2.37)
@@ -460,7 +457,7 @@ class ModifiedInterpreter(InteractiveInt self.rpcclt.listening_sock.settimeout(10) try: self.rpcclt.accept()
except socket.timeout as err:[](#l2.42)
except socket.timeout:[](#l2.43) self.display_no_subprocess_error()[](#l2.44) return None[](#l2.45) self.rpcclt.register("console", self.tkconsole)[](#l2.46)
@@ -495,7 +492,7 @@ class ModifiedInterpreter(InteractiveInt self.spawn_subprocess() try: self.rpcclt.accept()
except socket.timeout as err:[](#l2.51)
except socket.timeout:[](#l2.52) self.display_no_subprocess_error()[](#l2.53) return None[](#l2.54) self.transfer_path(with_cwd=with_cwd)[](#l2.55)
@@ -513,7 +510,7 @@ class ModifiedInterpreter(InteractiveInt # restart subprocess debugger if debug: # Restarted debugger connects to current instance of debug GUI
gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)[](#l2.60)
RemoteDebugger.restart_subprocess_debugger(self.rpcclt)[](#l2.61) # reload remote debugger breakpoints for all PyShellEditWindows[](#l2.62) debug.load_breakpoints()[](#l2.63) self.compile.compiler.flags = self.original_compiler_flags[](#l2.64)
@@ -671,7 +668,7 @@ class ModifiedInterpreter(InteractiveInt self.more = 0 self.save_warnings_filters = warnings.filters[:] warnings.filterwarnings(action="error", category=SyntaxWarning)
if isinstance(source, types.UnicodeType):[](#l2.69)
if isinstance(source, unicode):[](#l2.70) from idlelib import IOBinding[](#l2.71) try:[](#l2.72) source = source.encode(IOBinding.encoding)[](#l2.73)
@@ -1246,7 +1243,7 @@ class PyShell(OutputWindow): while i > 0 and line[i-1] in " \t": i = i-1 line = line[:i]
more = self.interp.runsource(line)[](#l2.78)
self.interp.runsource(line)[](#l2.79)
def open_stack_viewer(self, event=None): if self.interp.rpcclt: @@ -1260,7 +1257,7 @@ class PyShell(OutputWindow): master=self.text) return from idlelib.StackViewer import StackBrowser
sv = StackBrowser(self.root, self.flist)[](#l2.87)
StackBrowser(self.root, self.flist)[](#l2.88)
def view_restart_mark(self, event=None): self.text.see("iomark")
--- a/Lib/idlelib/RemoteDebugger.py +++ b/Lib/idlelib/RemoteDebugger.py @@ -100,7 +100,7 @@ class IdbAdapter: tb = tracebacktable[tbid] stack, i = self.idb.get_stack(frame, tb) ##print >>sys.stderr, "get_stack() ->", stack
stack = [(wrap_frame(frame), k) for frame, k in stack][](#l3.7)
stack = [(wrap_frame(frame2), k) for frame2, k in stack][](#l3.8) ##print >>sys.__stderr__, "get_stack() ->", stack[](#l3.9) return stack, i[](#l3.10)
--- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -125,11 +125,9 @@ def overrideRootMenu(root, flist): # # Due to a (mis-)feature of TkAqua the user will also see an empty Help # menu.
closeItem = Bindings.menudefs[0][1][-2]
--- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -1,5 +1,4 @@ import sys -import io import linecache import time import socket