Sorry guys, I had named my file email.py and hence the error.<br><br><br><br><div class="gmail_quote">On 24 May 2010 15:22, Jean-Michel Pichavant <span dir="ltr"><<a href="mailto:jeanmichel@sequans.com">jeanmichel@sequans.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">dirknbr wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have now easy_installled email and I still get errors.<div class="im"><br>
<br>
It doesn't error on 'import email' but does on call to MimeText.<br>
<br>
import email<br>
msg = MIMEText('test')<br>
<br>
NameError: name 'MIMEText' is not defined<br>
<br></div>
What should I do?<br>
<br>
</blockquote>
Using easy_install will not prevent the standard lib to be shadowed by another (user) module.<br>
<br>
did you print email.__file__ to verify the path ?<br>
Can you show us the output ?<br>
<br>
To give you an example, on a lenny python 2.5 distrib, the MIMEText class is in<br>
/usr/lib/python2.5/email/mime/text.py<br><font color="#888888">
<br>
JM<br>
</font></blockquote></div><br><br clear="all"><br>-- <br><a href="http://dirknbr.googlepages.com">http://dirknbr.googlepages.com</a><br><a href="http://maximum-likely.blogspot.com">http://maximum-likely.blogspot.com</a><br>
<br>