Re: Email in 2.6.4

2010-05-24 Thread Jean-Michel Pichavant
Dirk Nachbar wrote: Sorry guys, I had named my file email.py and hence the error. On 24 May 2010 15:22, Jean-Michel Pichavant > wrote: dirknbr wrote: I have now easy_installled email and I still get errors. It doesn't error on 'import ema

Re: Email in 2.6.4

2010-05-24 Thread Dirk Nachbar
Sorry guys, I had named my file email.py and hence the error. On 24 May 2010 15:22, Jean-Michel Pichavant 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 =

Re: Email in 2.6.4

2010-05-24 Thread Mark Lawrence
On 24/05/2010 14:59, dirknbr wrote: I have now easy_installled email and I still get errors. I've done this as well, but don't see why I have to. Is this a documentation bug, an installation bug or what? It doesn't error on 'import email' but does on call to MimeText. import email msg = MIME

Re: Email in 2.6.4

2010-05-24 Thread Jean-Michel Pichavant
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 b

Re: Email in 2.6.4

2010-05-24 Thread Simon Brunning
On 24 May 2010 14:59:24 UTC+1, dirknbr wrote: > It doesn't error on 'import email' but does on call to MimeText. > > import email > msg = MIMEText('test') > > NameError: name 'MIMEText' is not defined Here you want: msg = email.MIMEText('test') -- Cheers, Simon B. -- http://mail.python.org/ma

Re: Email in 2.6.4

2010-05-24 Thread dirknbr
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? -- http://mail.python.org/mailman/listinfo/python-list

Re: Email in 2.6.4

2010-05-24 Thread Jean-Michel Pichavant
dirknbr wrote: I am trying to run from email.mime.text import MIMEText but I get an ImportError: No module named mime.text Since email was pre-installed how do I fix this? Dirk Did you make sure you didn't hide the standard email module by one of your own. Check print email.__file__ /us

Email in 2.6.4

2010-05-24 Thread dirknbr
I am trying to run from email.mime.text import MIMEText but I get an ImportError: No module named mime.text Since email was pre-installed how do I fix this? Dirk -- http://mail.python.org/mailman/listinfo/python-list