Show More
@@ -457,7 +457,7 b' class DirectView(View):' | |||
|
457 | 457 | else: |
|
458 | 458 | user_ns[name] = sys.modules[name] |
|
459 | 459 | |
|
460 |
def view_import(name, globals={}, locals={}, fromlist=[], level= |
|
|
460 | def view_import(name, globals={}, locals={}, fromlist=[], level=0): | |
|
461 | 461 | """the drop-in replacement for __import__, that optionally imports |
|
462 | 462 | locally as well. |
|
463 | 463 | """ |
@@ -478,7 +478,7 b' class DirectView(View):' | |||
|
478 | 478 | imp.release_lock() |
|
479 | 479 | |
|
480 | 480 | key = name+':'+','.join(fromlist or []) |
|
481 |
if level |
|
|
481 | if level <= 0 and key not in modules: | |
|
482 | 482 | modules.add(key) |
|
483 | 483 | if not quiet: |
|
484 | 484 | if fromlist: |
General Comments 0
You need to be logged in to leave comments.
Login now