Another newbie getopt thread. ^_^

Chris Cioffi evenprimes at
Sun Jul 18 00:17:06 CEST 2004

On 17 Jul 2004 15:06:25 -0700, googleboy <mynews44 at> wrote:
> Hiya!
> I discovered getopt tonight after getting halfway through writing huge
> amounts of looping statements to try to ensure that text entered as
> parameters to my python app are within the bounds of what is allowed.

Look at the optparse module.

It allows you to define the parameter type, making it far easier to do
any followup validation.  As a bonues, it provides automatic support
for stuff like 'program --help'.

Still searching for an even prime > 2!

More information about the Python-list mailing list