Show More
@@ -25,6 +25,7 b' def demandload(scope, modules):' | |||||
25 | """ fake demandload function that collects the required modules |
|
25 | """ fake demandload function that collects the required modules | |
26 | foo import foo |
|
26 | foo import foo | |
27 | foo bar import foo, bar |
|
27 | foo bar import foo, bar | |
|
28 | foo@bar import foo as bar | |||
28 | foo.bar import foo.bar |
|
29 | foo.bar import foo.bar | |
29 | foo:bar from foo import bar |
|
30 | foo:bar from foo import bar | |
30 | foo:bar,quux from foo import bar, quux |
|
31 | foo:bar,quux from foo import bar, quux | |
@@ -38,6 +39,8 b' def demandload(scope, modules):' | |||||
38 | except: |
|
39 | except: | |
39 | module = m |
|
40 | module = m | |
40 | fromlist = [] |
|
41 | fromlist = [] | |
|
42 | if '@' in module: | |||
|
43 | module, as_ = module.split('@') | |||
41 | mod = __import__(module, scope, scope, fromlist) |
|
44 | mod = __import__(module, scope, scope, fromlist) | |
42 | if fromlist == []: |
|
45 | if fromlist == []: | |
43 | # mod is only the top package, but we need all packages |
|
46 | # mod is only the top package, but we need all packages |
General Comments 0
You need to be logged in to leave comments.
Login now