summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2001-07-14 04:45:32 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2001-07-14 04:45:32 (GMT)
commitdf8a40fbf57b7dd794803365a856b1f0f235d915 (patch)
tree347ffa109a8544f6c94b1052ab09ec8f90c4469f /Lib
parentfd182cd9d36adefba00d86542eb3134119cdc804 (diff)
downloadcpython-df8a40fbf57b7dd794803365a856b1f0f235d915.zip
cpython-df8a40fbf57b7dd794803365a856b1f0f235d915.tar.gz
cpython-df8a40fbf57b7dd794803365a856b1f0f235d915.tar.bz2
py-cvs-2000_07_13 (Rev 1.9) merge
"Delete goodname() method, which is unused. Add gotofileline(), a convenience method which I intend to use in a variant. Rename test() to _test()." --GvR This was an interesting merge. The join completely missed removing goodname(), which was adjacent, but outside of, a small conflict. I only caught it by comparing the 1.1.3.2/1.1.3.3 diff. CVS ain't infallible.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/FileList.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py
index befcf17..e01ce3c 100644
--- a/Lib/idlelib/FileList.py
+++ b/Lib/idlelib/FileList.py
@@ -29,15 +29,6 @@ class FileList:
self.inversedict = {}
self.vars = {} # For EditorWindow.getrawvar (shared Tcl variables)
-
- def goodname(self, filename):
- filename = self.canonize(filename)
- key = os.path.normcase(filename)
- if self.dict.has_key(key):
- edit = self.dict[key]
- filename = edit.io.filename or filename
- return filename
-
def open(self, filename, action=None):
assert filename
filename = self.canonize(filename)
@@ -62,6 +53,11 @@ class FileList:
else:
return action(filename)
+ def gotofileline(self, filename, lineno=None):
+ edit = self.open(filename)
+ if edit is not None and lineno is not None:
+ edit.gotoline(lineno)
+
def new(self):
return self.EditorWindow(self)
@@ -131,7 +127,7 @@ class FileList:
return os.path.normpath(filename)
-def test():
+def _test():
from EditorWindow import fixwordbreaks
import sys
root = Tk()
@@ -147,4 +143,4 @@ def test():
root.mainloop()
if __name__ == '__main__':
- test()
+ _test()