From: Guido van Rossum Date: Thu, 5 Jun 2003 11:36:55 +0000 (+0000) Subject: Change to <>: always pop up the dialog, using the current X-Git-Tag: v2.3c1~534 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=852f35bbeb23d898fb0d16489effb1197ee3fe02;p=python Change to <>: always pop up the dialog, using the current selection as the default value. This is easier to use habitually. --- diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 2303537dfe..86532f873b 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)