Hi, I would like to use python for things I've been doing using bash. Is it possible to use the -c switch for long programs, e.g. a for loop with two statements? This would let me use python directly from command line, just like bash or php.
Thanks.
EDIT: Don't know how I missed it, simply doing a python -c ' and then pressing enter does what I've wanted to do. I'd tried a lot of variations, and one using a \ but that didn't work, so I asked the question. e.g.
$python -c '
>print "x"
>for i in range(3):
> print "y" '
does what I wanted to do, though Rod's answer looks good too.