Message190667
| Author |
kristjan.jonsson |
| Recipients |
Pascal.Chambon, barry, brett.cannon, eric.snow, isoschiz, kristjan.jonsson, methane, ncoghlan, pconnell, pje |
| Date |
2013年06月05日.15:42:30 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1370446950.36.0.322649612816.issue17636@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
One question.
when doing "Programmatic" import, i.e. using the __import__ function, how do we do the same?
#module foo.B
A = __import__(".", fromlist=["A"]).A
#module foo.A
B = __import__(".", fromlist=["B"]).B
Clearly the above won't work. Can we extend __import__ to allow a full path, including relative? The objection about which name to bind to is no longer valid, since the binding is explicit.
So, could we do:
#module foo.B
A = __import__(".A")
#module foo.A
B = __import__(".B")
? |
|