main
main copied to clipboard
"from <package> import *" fails, causes KeyError
Version info:
IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.1
Example:
from email import *
Traceback (most recent call last):
File "", line 1, in
KeyError: base64mime
import email
Work Item Details
Original CodePlex Issue: Issue 31305 Status: Proposed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Aug 24, 2011 at 11:29 AM Reported by: mejohansen Updated on: Feb 22, 2013 at 2:09 AM Updated by: slide_o_mix
On 2011-08-24 18:48:49 UTC, mejohansen commented:
I found a workaround for IronPython init.py for the package must be changed to something like: all_modules = ['module1', 'module2', 'module3']
for module in all_modules: import('%s.%s' % (name, module))
Of course, for vanilla Python, it is sufficient to do: all = all_modules
On 2012-03-13 03:10:55 UTC, slide_o_mix commented:
This still exists on 2.7.2