December 18, 2005 Archives

18.12.2005 23:13

Python email module

A little trick I picked up here. DO NOT name your email script 'email.py'. The reason is when it executes the command: import email It will import your script and then error out, obviously. I used this example here http://www.bigbold.com/snippets/posts/show/757 and got the same problem this chap did http://mail.python.org/pipermail/python-list/2003-June/170285.html Found out on my own it was simply because I named my test script email.py and executed it: ./email.py Now if I had named it simply email ....... -----

Posted by DaveQB | Permanent Link | Categories: IT