def getopts():
    """Returns a dictionary of system arguments, all keys are lowercase
    """
    opts = {}
    i = 1 #position 0 = script name
    while i < len(sys.argv):
        key = str(sys.argv[i])
        try: value = str(sys.argv[i+1])
        except: value = None
        if key.startswith('-'): #if its a flag
            if value and not(value.startswith('-')):
                opts[str(key[1:]).lower()] = value #if it has a value also
                i +=1 #advance cursor passed value
            else:
                opts[key[1:]] = None
        i +=1 #advance cursor passed key
    return opts
Returns a dictionary of system arguments, all keys are lowercase
    
recipes/Python/285215_Package__Module_Versioning_Bootstrap_Loader_/recipe-285215.py