http://www.codeexamples.org/cgi-bin/...pe=HTML-detail

This is an example of cmd.py which makes it easy and fun to make command programs.