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
4f9f8e35
Commit
4f9f8e35
authored
Sep 09, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make functionality more closely the same as what's implemented by default.
parent
501d0bb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
Lib/knee.py
Lib/knee.py
+12
-8
No files found.
Lib/knee.py
View file @
4f9f8e35
...
...
@@ -63,13 +63,22 @@ def load_tail(q, tail):
raise
ImportError
,
"No module named "
+
mname
return
m
def
ensure_fromlist
(
m
,
fromlist
):
def
ensure_fromlist
(
m
,
fromlist
,
recursive
=
0
):
for
sub
in
fromlist
:
if
sub
==
"*"
:
if
not
recursive
:
try
:
all
=
m
.
__all__
except
AttributeError
:
pass
else
:
ensure_fromlist
(
m
,
all
,
1
)
continue
if
sub
!=
"*"
and
not
hasattr
(
m
,
sub
):
subname
=
"%s.%s"
%
(
m
.
__name__
,
sub
)
submod
=
import_module
(
sub
,
subname
,
m
)
##
if not submod:
##
raise ImportError, "No module named " + subname
if
not
submod
:
raise
ImportError
,
"No module named "
+
subname
def
import_module
(
partname
,
fqname
,
parent
):
try
:
...
...
@@ -108,8 +117,3 @@ original_reload = __builtin__.reload
# Now install our hooks
__builtin__
.
__import__
=
import_hook
__builtin__
.
reload
=
reload_hook
# pretend we're ni, too
sys
.
modules
[
'ni'
]
=
sys
.
modules
[
__name__
]
def
ni
():
pass
def
install
():
pass
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