Connecting Tech Pros Worldwide Help | Site Map

Python one-liner??

srinivasan srinivas
Guest
 
Posts: n/a
#1: Aug 22 '08
Hi,
Do we have python one-liner like perl one-liner 'perl -e'??
Thanks,
Srini


Unlimited freedom, unlimited storage. Get it now, onhttp://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
Wojtek Walczak
Guest
 
Posts: n/a
#2: Aug 22 '08

re: Python one-liner??


-c?
Matimus
Guest
 
Posts: n/a
#3: Aug 22 '08

re: Python one-liner??


Do we have python one-liner like perl one-liner 'perl -e'??


The answer is python -c...

but python -h is useful too.

Matt
Paddy
Guest
 
Posts: n/a
#4: Aug 23 '08

re: Python one-liner??


On Aug 22, 10:03*pm, Matimus <mccre...@gmail.comwrote:
Quote:
Quote:
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.
Closed Thread