[Tutor] opts and try except
Eric Walker
ewalker at micron.com
Fri Nov 18 00:31:29 CET 2005
All,
I have a program now that works just like I want it. Now I want to
integerate something to say print usage info when the user puts in the wrong
number or type of options. Also print usage say if you type program name and
-h or -H. I currently just have functions defined and at the bottom make a
function call. Do I need to do like the def main(): and then the if __name__
== "__main__"? I need an example of how to implement this.
Thanks in advance.
python newbie.....
More information about the Tutor
mailing list