multiline prototyping on command line

Malcolm Tredinnick malcolmt at smart.net.au
Sat Oct 30 04:35:41 EDT 1999


On Sat, Oct 30, 1999 at 08:13:46AM +0000, Eric Smith wrote:
> I am am a perl programmer looking at Python and would like to know whether
> it is possible on the command line to test algorithms like I do in perl
> thusly:
> 
> perl -e '$r="de";if ($r eq "whatever" or "de") {print "a match\n"}

Yessir! It's the -c option and it has to be the last
option on the command line.

python --help gives you a list of all the command line options.

Cheers,
Malcolm Tredinnick




More information about the Python-list mailing list