From 852f35bbeb23d898fb0d16489effb1197ee3fe02 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 5 Jun 2003 11:36:55 +0000 Subject: Change to <>: always pop up the dialog, using the current selection as the default value. This is easier to use habitually. --- Lib/idlelib/EditorWindow.py | 15 +++++++-------- 1 file 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) -- cgit v0.12