Good morning,
For testing purposes, I have made a one-line Python program:
from email.mime.multipart import MIMEMultipart
When I run it through the interpeter, I get an awful error message:
from email.mime.multipart import MIMEMultipart ImportError: No module named mime.multipart
I am using Python version 2.4.3. I suspect that the email module has changed its packaging structure in the intervening versions, hence the error. Is my suspicion correct? If not, why is the import statement not working?
Thanks in advance,
ktm
Module reorganization. The convention is for module names to be lower case, so some got renamed. In this case, the module you're looking for in Python 2.4.3 is email.MIMEMultipart
.
Here's the docs from back then, in case the API has changed.
Call me dumb, but I was getting ImportError: No module named mime.text
because my script was called email.py
.... lol (blame on 4 am programming)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With