A syntax idea for one-liners
phil hunt
philh at cabalamat.org
Tue May 27 09:45:55 EDT 2003
On Mon, 26 May 2003 12:54:43 -0400, Lulu of the Lotus-Eaters <mertz at gnosis.cx> wrote:
>philh at cabalamat.org (phil hunt) wrote previously:
>|>Now I like that idea, you could write a module with a short name that
>|>when imported could read an option for the oneliner, transform then exec it.
>|>
>|> python -e 'import L1' -L1 'if a: if b: c;; if d: e;;; f; h'
>|
>|Or better, have a python1L executable allowing you to write:
>|
>| python1L 'if a: if b: c;; if d: e;;; f; h'
>
>And best still, just write an five line script called 'python1L' (or
>whatever) whose first line is "#!/usr/bin/env python", and use that to
>run your one liners with odd semicolon syntax.
Indeed, that's what I meant. ("Executable" meant the x flag
is set, it doesn't mean it contains binary machine code).
--
Philip Hunt <philh at cabalamat.org>
Interested in adventure holidays in Spain?
Look at: <http://www.cabalamat.org/advcon/>
More information about the Python-list
mailing list