Python one-liner??

Paddy paddy3118 at googlemail.com
Sat Aug 23 00:07:45 EDT 2008


On Aug 22, 10:03 pm, Matimus <mccre... at gmail.com> wrote:
> > Do we have python one-liner like perl one-liner 'perl -e'??
>
> The answer is python -c...
>
> but python -h is useful too.
>
> Matt

And Python is not optimised for one-liner solutions.
I have been known to construct multi-line -c arguments using
the bash shell on Unix (as bash supports multi-line quotes),
but creating and then deleting a temporary file saves me from
'quoting hell'.

- Paddy.



More information about the Python-list mailing list