Python2.2 + mailbox. Bug????
hector
hectoraranguren at hispavista.com
Fri May 21 11:56:39 EDT 2004
Hi
This is my program:
#!/usr/bin/python
import sys
from mailbox import PortableUnixMailbox
tmp = sys.stdin
mbox = PortableUnixMailbox(tmp)
mbox.next()
...
...
When I execute: "./program.py < mboxfile.txt", there's no problem
But, if I execute: "cat mboxfile.txt | program.py" ... too bad!
the error:
Traceback (most recent call last):
File "./prueba.py", line 8, in ?
mbox.next()
File "/usr/lib/python2.2/mailbox.py", line 23, in next
self.fp.seek(self.seekp)
IOError: [Errno 29] Illegal seek
Why????? Thanks ALL!!
More information about the Python-list
mailing list