diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2017-09-30 23:54:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-30 23:54:28 (GMT) |
commit | d6bb65f378e34fe0c11fdb39588357ecf22964eb (patch) | |
tree | 5cdcb340f58d22e9e04a7a0ed043a91e57847dff /Lib/idlelib/editor.py | |
parent | bfebfd81de21b7906df386fce845f2b1f5ffd212 (diff) | |
download | cpython-d6bb65f378e34fe0c11fdb39588357ecf22964eb.zip cpython-d6bb65f378e34fe0c11fdb39588357ecf22964eb.tar.gz cpython-d6bb65f378e34fe0c11fdb39588357ecf22964eb.tar.bz2 |
bpo-31460: Simplify the API of IDLE's Module Browser. (#3842)
Passing a widget instead of an flist with a root widget opens the option of
creating a browser frame that is only part of a window. Passing a full file
name instead of pieces assumed to come from a .py file opens the possibility
of browsing python files that do not end in .py.
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r-- | Lib/idlelib/editor.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 5b16cce..87d1eef 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -664,10 +664,8 @@ class EditorWindow(object): filename = self.open_module() if filename is None: return "break" - head, tail = os.path.split(filename) - base, ext = os.path.splitext(tail) from idlelib import browser - browser.ModuleBrowser(self.flist, base, [head]) + browser.ModuleBrowser(self.root, filename) return "break" def open_path_browser(self, event=None): |