This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hgibson50
Recipients
Date 2006-05-04.07:24:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
http://docs.python.org/lib/node588.html says: 

----------------------
Each of these classes should be imported from a module 
with the same name as the class, from within the email 
package. E.g.: 


import email.MIMEImage.MIMEImage

or 

from email.MIMEText import MIMEText
----------------------

However, here is a Python IDLE session showing that 
the first import format doesn't work:

----------------------
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 
32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more 
information.

<snip>
    
IDLE 1.1.3      
>>> import email.MIMEImage.MIMEImage

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in -toplevel-
    import email.MIMEImage.MIMEImage
ImportError: No module named MIMEImage
>>> 
----------------------

This method *does* work:

----------------------
>>> import email.MIMEImage
>>> 
----------------------

This got one of my inexperienced programmers tied up 
in knots!

Hugh
History
Date User Action Args
2007-08-23 14:39:48adminlinkissue1481650 messages
2007-08-23 14:39:48admincreate