Do we have python equivalent of 'perl -e'??

Ben Finney bignose+hates-spam at
Fri Aug 22 08:25:14 CEST 2008

srinivasan srinivas <sri_annauni at> writes:

> Like we run perl small code snippet using perl -e, do we have
> anything like that in python??

It's customary to check the usage summary of the program itself.

$ python --help
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
-c cmd : program passed in as string (terminates option list)

 \     “I got some new underwear the other day. Well, new to me.” —Emo |
  `\                                                           Philips |
_o__)                                                                  |
Ben Finney

More information about the Python-list mailing list