469,362 Members | 2,491 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

Re: py2exe bug with email.MIMEText

Hi,

After some debugging, i found the solution is to :-

import email
import email.mime.text
import email.iterators
import email.generator
import email.utils

Marcus.
Marcus.CM wrote:
There is a bug with py2exe when (at least under windows) when
importing email

# example testmime.py
import email
msg = email.MIMEText.MIMEText("dsafdafdasfA")
print "ok"

1. Save the text above and setup as testmime.py
2. Run it and u can see "ok"
3. Create setup.py and run : python setup.py py2exe
4. Run the testmime.exe and u will get error "Import error : No module
name text"

# Example setup.py
from distutils.core import setup
import py2exe
setup(console=['testmime.py'])

Anyone knows the fix for this?

--
http://mail.python.org/mailman/listinfo/python-list

Aug 1 '08 #1
0 807

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mark Hahn | last post: by
3 posts views Thread by Alberto Vera | last post: by
9 posts views Thread by Ernesto | last post: by
20 posts views Thread by Chris Withers | last post: by
3 posts views Thread by Erik Johnson | last post: by
2 posts views Thread by Torsten Bronger | last post: by
reply views Thread by Marcus.CM | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.