Email in 2.6.4

Dirk Nachbar dirknbr at googlemail.com
Mon May 24 10:36:59 EDT 2010


Sorry guys, I had named my file email.py and hence the error.



On 24 May 2010 15:22, Jean-Michel Pichavant <jeanmichel at sequans.com> wrote:

> dirknbr wrote:
>
>> I have now easy_installled email and I still get errors.
>>
>>
>> It doesn't error on 'import email' but does on call to MimeText.
>>
>> import email
>> msg = MIMEText('test')
>>
>> NameError: name 'MIMEText' is not defined
>>
>> What should I do?
>>
>>
> Using easy_install will not prevent the standard lib to be shadowed by
> another (user) module.
>
> did you print email.__file__ to verify the path ?
> Can you show us the output ?
>
> To give you an example, on a lenny python 2.5 distrib, the MIMEText class
> is in
> /usr/lib/python2.5/email/mime/text.py
>
> JM
>



-- 
http://dirknbr.googlepages.com
http://maximum-likely.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100524/5edcdb4b/attachment.html>


More information about the Python-list mailing list