All pastes #141819 Raw Edit

Unnamed

public text v1 · immutable
#141819 ·published 2006-08-21 03:54 UTC
rendered paste body
Vimport sys, optparse, os, ConfigParser

import functions # our modules

parser = optparse.OptionParser("%prog yourname@yourdomain.org \"Your support message\" [options]")

config = ConfigParser.ConfigParser()
config.readfp(open('list.conf'))

for x in config.sections():
        sflag = config.get(x, "sflag")
        lflag = config.get(x, "lflag")
        command = config.get(x, "command")
        help = config.get(x, "help")
        print sflag
        print lflag
        parser.add_option('"%s", "%s", action="store_true", help="%s", default=False)' % (sflag, lflag, help)

(options, args) = parser.parse_args()