using python with -c (as a inline execution in shell)

Simon Brunning simon.brunning at gmail.com
Tue Nov 16 11:22:01 EST 2004


On 16 Nov 2004 07:44:19 -0800, les ander <les_ander at yahoo.com> wrote:
> but suppose I want to read from the stdin (piped) i don't know how to do this since
> python -c "from sys import stdin; for x in stdin: print x"
> 
> gives a syntax error.

If you really must do this, there's always PyOne:
<http://www.unixuser.org/~euske/pyone/>.

Wouldn't touch it with a bargepole, myself.

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list