getopt module..

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

getopt module..

Asrarahmed Kadri

Can somebody explain getopt function using a simple example..
 
Thanks..
 
Regards,
 
Asrarahmed Kadri
--
To HIM you shall return.

_______________________________________________
Tutor maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/tutor
Reply | Threaded
Open this post in threaded view
|

Re: getopt module..

David Rock
* Asrarahmed Kadri <[hidden email]> [2006-10-22 20:19]:
> Can somebody explain getopt function using a simple example..
>
> Thanks..

This really does have a good example of usage

http://docs.python.org/lib/module-getopt.html

Essentially, you define options and arguments and what you expect to see
from them, then the

for o, a in opts:

section is used to replace default values with information from the
commandline.

--
David Rock
[hidden email]
_______________________________________________
Tutor maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/tutor