[Tutor] Equivalent to perl -e

Chris Lasher chris.lasher at gmail.com
Mon Oct 16 04:07:25 CEST 2006


Haha! I'll relay that message! Thanks Kent and Glenn!

Chris

On 10/15/06, Glenn T Norton <gtnorton at earthlink.net> wrote:
> Chris Lasher wrote:
>
> >My professor and advisor has been "inspired" by me to give Python a
> >try. He's an avid Perl user, and challenged me with the following:
> >
> >What is the Python equivalent to perl -e '<some oneliner>'?
> >
> >Embarassingly, I had no answer, but I figure, someone on the list will
> >know. His use of Python is at stake; he threatened that, since he's
> >dependant enough on using perl -e within Emacs enough, if it can't be
> >done in Python, he won't take the language seriously. Help me, Python
> >Tutor, you're his only hope!
> >
> >Thanks in advance,
> >Chris
> >_______________________________________________
> >Tutor maillist  -  Tutor at python.org
> >http://mail.python.org/mailman/listinfo/tutor
> >
> >
> >
> How about...
> python -c "for x in 'Tell them to jump on board and take the blue pill':
> print x"
>
> Glenn
>
> --
> "Ketchup. For the good times... " - Ketchup Advisory Board
> Glenn Norton
> Application Developer
> Nebraska.gov
> 1-402-471-2777
> glenn at nebraska.gov
>
>


More information about the Tutor mailing list