[ python-Bugs-1481650 ] Docs on import of email.MIMExxx classes wrong

SourceForge.net noreply at sourceforge.net
Thu May 4 13:28:12 CEST 2006


Bugs item #1481650, was opened at 2006-05-04 03:24
Message generated for change (Settings changed) made by bwarsaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1481650&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Hugh Gibson (hgibson50)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: Docs on import of email.MIMExxx classes wrong

Initial Comment:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1481650&group_id=5470


More information about the Python-bugs-list mailing list