ich habe gerade ein reichlich verwirrendes Problem.
Ich möchte email.header verwenden, das ist eigentlich kein großes Problem. Jetzt kommt es aber zu folgendem Effekt, den ich in der IDLE-Shell nachgestellt habe:
Code: Alles auswählen
>>> ================================ RESTART ================================
>>> import email
>>> a = "Hallo"
>>> email.header.decode_header(a)
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
email.header.decode_header(a)
AttributeError: 'module' object has no attribute 'header'
>>> email
<module 'email' from 'C:\Python27\lib\email\__init__.pyc'>
>>> email.header
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
email.header
AttributeError: 'module' object has no attribute 'header'
>>> help(email)
Help on package email:
[...] # hier habe ich gekürzt
>>> email.header
<module 'email.header' from 'C:\Python27\lib\email\header.pyc'>
Hilfe?
Gruß
Sebastian