[Pythonmac-SIG] rfc822 lib
Francois Granger
fgranger@altern.org
Sun, 23 Jul 2000 22:48:46 +0200
I am currently using this lib to create a script to help moderators
of newsgroups wich works on macintoshes. In the docs it says:
<quote>
Input lines as read from the file may either be terminated by CR-LF
or by a single linefeed; a terminating CR-LF is replaced by a single
linefeed before the line is stored.
</quote>
I uses the simple script:
try:
f = open(file, 'r')
except IOError, msg:
print file, ': can\'t open :', msg
return 0
m = rfc822.Message(f, 1)
With a Mac file it works. With a dos file, it does not recognise the
header. You can easily see it by browsing the 'm' object under
debugger.
--
"Computers are like horses; they can sense fear and will act based on
that. Or, look at it like this. If you have a premonition of danger,
maybe you're right." - Adam Engst