I have now bumped into this problem twice recently and am curious if there is a solution.
So I have a module that confilcts with a python builtin. For example, say I have a myapp.email module defined in myapp/email.py.
Now anywhere in my code I can reference myapp.email just fine. However, I need to reference the builtin Python email library in my myapp/email.py file.
However, if I do:
from email import message_from_string
It of course, only finds itself, and therefore raises an ImportError on the method. Similarly, "import email" does the same when I try to call email.message_from_string() inside the module.
Is there any native support to do this in Python, or am I stuck with renaming my "email" module to something more specific?
thanks,