Bugs item #1481650, was opened at 2006-05-04 03:24 Message generated for change (Comment added) 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: Closed >Resolution: Fixed 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 ---------------------------------------------------------------------- >Comment By: Barry A. Warsaw (bwarsaw) Date: 2006-07-27 22:36 Message: Logged In: YES user_id=12800 r50890 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1481650&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com