Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f6445e8f
Commit
f6445e8f
authored
Apr 12, 2011
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 11718: Teach IDLE's open module dialog to find packages.
parent
d5315482
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+11
-0
Misc/NEWS
Misc/NEWS
+6
-0
No files found.
Lib/idlelib/EditorWindow.py
View file @
f6445e8f
...
...
@@ -50,6 +50,17 @@ def _find_module(fullname, path=None):
path
=
module
.
__path__
except
AttributeError
:
raise
ImportError
(
'No source for module '
+
module
.
__name__
)
if
descr
[
2
]
!=
imp
.
PY_SOURCE
:
# If all of the above fails and didn't raise an exception,fallback
# to a straight import which can find __init__.py in a package.
m
=
__import__
(
fullname
)
try
:
filename
=
m
.
__file__
except
AttributeError
:
pass
else
:
file
=
None
descr
=
os
.
path
.
splitext
(
filename
),
None
,
imp
.
PY_SOURCE
return
file
,
filename
,
descr
class
EditorWindow
(
object
):
...
...
Misc/NEWS
View file @
f6445e8f
...
...
@@ -224,6 +224,12 @@ Build
- Issue #11268: Prevent Mac OS X Installer failure if Documentation
package had previously been installed.
IDLE
----
- Issue #11718: IDLE'
s
open
module
dialog
couldn
't find the __init__.py
file in a package.
Tools/Demos
-----------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment