]> granicus.if.org Git - python/commitdiff
Change to <<open-module>>: always pop up the dialog, using the current
authorGuido van Rossum <guido@python.org>
Thu, 5 Jun 2003 11:36:55 +0000 (11:36 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 5 Jun 2003 11:36:55 +0000 (11:36 +0000)
selection as the default value.  This is easier to use habitually.

Lib/idlelib/EditorWindow.py

index 2303537dfe16c13b818ada30a7c64e260d3143b5..86532f873bd7f49061e07d0e7e6ce1b1ef56ffea 100644 (file)
@@ -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)