I once wrote a command line parser, its at http://members.home.com/gindikin/dev/python/cmdline Check it out, it may give you some ideas. -- Dan