H
hector
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!!
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!!