[Tutor] Equivalent to perl -e
Mike Hansen
Mike.Hansen at atmel.com
Mon Oct 16 18:45:59 CEST 2006
> -----Original Message-----
> From: tutor-bounces at python.org
> [mailto:tutor-bounces at python.org] On Behalf Of wesley chun
> Sent: Monday, October 16, 2006 12:51 AM
> To: Chris Lasher
> Cc: Python Tutor
> Subject: Re: [Tutor] Equivalent to perl -e
>
> > 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
I had this same issue when I moved from Perl to Python. You might take a
look at pyflakes, pychecker, or pylint.
Mike
More information about the Tutor
mailing list