def getopts(argv):
    opts = {}
    while argv:
        if (argv[0][0] == '-'):
            try:
                opts[argv[0]] = argv[1]
            except:
                opts[argv[0]] = ''
        argv = argv[1:]
    return opts
def getopts(argv):
    opts = {}
    while argv:
        if (argv[0][0] == '-'):
            try:
                opts[argv[0]] = argv[1]
            except:
                opts[argv[0]] = 
        argv = argv[1:]
    return opts