sys.stdin and

Bengt Richter bokr at
Mon Jan 20 11:07:35 CET 2003

On Mon, 20 Jan 2003 00:24:24 -0600, "Jimmie Fulton" <jimmie-dated-1043474834.7879b0 at> wrote:

>I'm unable to get any matches with re in a loop when the file I'm looping
>over is stdin.  When I use open(), it works fine.  Any hints?
First, what system and version are you using?
How is the data getting to stdin? Are you piping it from another app? Are you
running either with pythonwin? Are you using os.system or os.popen to launch stuff?

E.g., on some versions of windows, if you run the script without
explicitly running python (i.e., relying on windows file extension association),
piping won't work, nor redirecting i/o.

Bengt Richter

More information about the Python-list mailing list