This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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")


?
History
Date User Action Args
2013-06-05 15:42:30kristjan.jonssonsetrecipients: + kristjan.jonsson, barry, brett.cannon, pje, ncoghlan, methane, eric.snow, pconnell, isoschiz, Pascal.Chambon
2013-06-05 15:42:30kristjan.jonssonsetmessageid: <1370446950.36.0.322649612816.issue17636@psf.upfronthosting.co.za>
2013-06-05 15:42:30kristjan.jonssonlinkissue17636 messages
2013-06-05 15:42:30kristjan.jonssoncreate