Re: email libraries in python?
- From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Tue, 30 Dec 2008 17:51:25 -0700
thanks, I'll try that out. I was looking from the sample scripts on the python
homepage, and wanted to start working with email.
----- Original Message -----
From: Ken Perry
To: programmingblind@xxxxxxxxxxxxx
Sent: Tuesday, December 30, 2008 5:37 PM
Subject: RE: email libraries in python?
Very strange I tried it and it worked fine on my cygwin python and on my
linux one. One thing you can try to see if you have the package correct in
your distribution is when in the interpreter do something like this.
Import email.mime
If that works try
Import email.mime.text
If that does not work then try
Dir (email.mime)
See what it tells you. I am betting your missing a package but until you
check with Dir you won't know. Note you need to do the import email.mime first
before you can do dir(email.mime)
Ken
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler Littlefield
Sent: Tuesday, December 30, 2008 11:55 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: email libraries in python?
Hello list,
I was trying to make a mail sender of sorts in python, and have a question.
#!/usr/bin/python2.5
import sys
import atexit
import smtplib
from email.mime.text import MIMEText
the compiler errors: I'm using 2.5, and it says email v4 was distributed with
2.5... here's the error
Traceback (most recent call last):
File "./email.py", line 4, in <module>
import smtplib
File "/usr/lib/python2.5/smtplib.py", line 46, in <module>
import email.Utils
File "/home/tyler/email.py", line 5, in <module>
from email.mime.text import MIMEText
ImportError: No module named mime.text
tyler@tds:~$
Other related posts: