Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python one-liner??

Reply
Thread Tools

Python one-liner??

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


Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mai...tools-08.html/
 
Reply With Quote
 
 
 
 
Matimus
Guest
Posts: n/a
 
      08-22-2008
> Do we have python one-liner like perl one-liner 'perl -e'??


The answer is python -c...

but python -h is useful too.

Matt
 
Reply With Quote
 
 
 
 
Paddy
Guest
Posts: n/a
 
      08-23-2008
On Aug 22, 10:03*pm, Matimus <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Python-Dev] [python-committers] [RELEASED] Python 3.2 rc 1 R. David Murray Python 0 01-17-2011 02:23 PM
Re: [Python-Dev] [python-committers] [RELEASED] Python 3.2 rc 1 Senthil Kumaran Python 0 01-17-2011 10:31 AM
Re: [Python-Dev] [Python-3000] RELEASED Python 2.6a1 and 3.0a3 Martin v. L÷wis Python 0 03-01-2008 10:51 PM
Re: [Python-Dev] [Python-3000] RELEASED Python 2.6a1 and 3.0a3 Paul Moore Python 0 03-01-2008 10:39 PM
Searching comp.lang.python/python-list@python.org (was: UTF-8) skip@pobox.com Python 0 03-10-2007 02:50 PM



Advertisments