diff options
author | Guido van Rossum <guido@python.org> | 2003-06-05 11:36:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-06-05 11:36:55 (GMT) |
commit | 852f35bbeb23d898fb0d16489effb1197ee3fe02 (patch) | |
tree | 71398b77c2d6c8841a948ad22d1aaea4f15a05c3 /Lib/idlelib | |
parent | 3f8ace9a0f51ffd3f83c57d145a10d2e18751ee7 (diff) | |
download | cpython-852f35bbeb23d898fb0d16489effb1197ee3fe02.zip cpython-852f35bbeb23d898fb0d16489effb1197ee3fe02.tar.gz cpython-852f35bbeb23d898fb0d16489effb1197ee3fe02.tar.bz2 |
Change to <<open-module>>: always pop up the dialog, using the current
selection as the default value. This is easier to use habitually.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 2303537..86532f8 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -411,15 +411,14 @@ class EditorWindow: name = "" else: name = name.strip() + name = tkSimpleDialog.askstring("Module", + "Enter the name of a Python module\n" + "to search on sys.path and open:", + parent=self.text, initialvalue=name) + if name: + name = name.strip() if not name: - name = tkSimpleDialog.askstring("Module", - "Enter the name of a Python module\n" - "to search on sys.path and open:", - parent=self.text) - if name: - name = name.strip() - if not name: - return + return # XXX Ought to insert current file's directory in front of path try: (f, file, (suffix, mode, type)) = _find_module(name) |