py2exe bug with email.MIMEText

Discussion in 'Python' started by Marcus.CM, Aug 1, 2008.

  1. Marcus.CM

    Marcus.CM Guest

    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?
     
    Marcus.CM, Aug 1, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Irmen de Jong
    Replies:
    1
    Views:
    683
    Irmen de Jong
    Jan 18, 2004
  2. Damjan

    Unicode in MIMEText

    Damjan, Nov 24, 2005, in forum: Python
    Replies:
    5
    Views:
    550
    Damjan
    Nov 28, 2005
  3. Robert
    Replies:
    0
    Views:
    330
    Robert
    Jan 18, 2006
  4. Dale Strickland-Clark

    MIMEText breaking the rules?

    Dale Strickland-Clark, Aug 1, 2007, in forum: Python
    Replies:
    2
    Views:
    346
    Dale Strickland-Clark
    Aug 6, 2007
  5. neubyr
    Replies:
    0
    Views:
    249
    neubyr
    Sep 6, 2011
Loading...

Share This Page