Python one-liner??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • srinivasan srinivas

    Python one-liner??

    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

    #2
    Re: Python one-liner??

    -c?

    Comment

    • Matimus

      #3
      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

      Comment

      • Paddy

        #4
        Re: Python one-liner??

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

        Comment

        Working...