Illegal seek with os.popen

Aahz aahz at
Wed Jun 3 15:36:40 EDT 2009

In article <7c93031a-235e-4e13-bd37-7c9dbc6e889c at>,
 <pruebauno at> wrote:
>Should I open a bug report for this?
>Python 2.5.1 (r251:54863, Sep 19 2007, 14:58:06) [C] on aix5
>Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> os.popen('cat','w')
><open file 'cat', mode 'w' at 0x110111990>
>Python 3.1rc1 (r31rc1:73054, Jun  1 2009, 10:49:24) [C] on aix5
>Type "help", "copyright", "credits" or "license" for more information.
>>>> os.popen('cat','w')
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/Python-3.1rc1/Lib/", line 641, in popen
>    return _wrap_close(io.TextIOWrapper(proc.stdin), proc)
>IOError: [Errno 29] Illegal seek

What happens in 2.6 and 3.0?
Aahz (aahz at           <*>

"Given that C++ has pointers and typecasts, it's really hard to have a
serious conversation about type safety with a C++ programmer and keep a
straight face.  It's kind of like having a guy who juggles chainsaws
wearing body armor arguing with a guy who juggles rubber chickens wearing
a T-shirt about who's in more danger."  --Roy Smith,, 2004.05.23

More information about the Python-list mailing list