[Tutor] Equivalent to perl -e
wesley chun
wescpy at gmail.com
Mon Oct 16 08:51:21 CEST 2006
> His lab maintains a significant amount of Perl code
this sounds like a full-time job on its own. everyone brings up a
good point... use the right tool for the job. if it's one-liners,
that's what perl -e is made for. for everything else that you
mentioned above, Python is the the one, preferably the only one
--obvious way to do it. :-)
one perl'y thing that i *do* use is perl -c, for checking your syntax.
i don't believe there's an equivalent way to do that from the Python
cmd-line (correct me if i'm wrong!), but i wrote up a short script I
called (pydashc.py) which just uses compile() to get the same
effect... very useful for when i don't want to *run* something to see
if i made any typos.
regards,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com
wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
More information about the Tutor
mailing list