email module documentation
David Bear
david.bear at asu.edu
Tue Nov 22 23:05:06 EST 2005
I'm confused about how to use the email module in python 2.4.x
I'm using python packaged with suse 9.3.
>From the module documetation at http://docs.python.org/lib/node597.html I
found the following example (items cut):
import email
...
msg = email.message_from_file(fp)
..
Yet, when I try this I get the message
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'message_from_file'
so I dir(email) reveals:
['__builtins__', '__doc__', '__file__', '__name__', 'cStringIO', 'email',
'getMessage', 'sys']
This is nothing like the documentation on python.org.
Any idea what I am missing?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
More information about the Python-list
mailing list