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 brett.cannon
Recipients brett.cannon, eric.snow, jaraco
Date 2012-01-30.22:42:25
SpamBayes Score 3.9726483e-06
Marked as misclassified No
Message-id <1327963345.73.0.864227177747.issue13912@psf.upfronthosting.co.za>
In-reply-to
Content
I see your mistake now: you need to call it as __import__('pkgB', globals(), index=1), else __import__ has no clue how to anchor your import in the relative package space.

Try that and let me know if it makes it work.

And why exactly are you trying to call __import__ directly? You should be using importlib.import_module() for programmatic imports.
History
Date User Action Args
2012-01-30 22:42:25brett.cannonsetrecipients: + brett.cannon, jaraco, eric.snow
2012-01-30 22:42:25brett.cannonsetmessageid: <1327963345.73.0.864227177747.issue13912@psf.upfronthosting.co.za>
2012-01-30 22:42:25brett.cannonlinkissue13912 messages
2012-01-30 22:42:25brett.cannoncreate