def get_commands():
    commands = {}

    #Try to load the settings file (settings can be specified on the command line) and get the INSTALLED_APPS
    try:
        from percept.conf.base import settings
        apps = settings.INSTALLED_APPS
    except KeyError:
        apps = []

    #For each app, try to find the command module (command folder in the app)
    #Then, try to load all commands in the directory
    for app_name in apps:
        try:
            path = find_commands_module(app_name)
            commands.update(dict([(name, app_name) for name in find_all_commands(path)]))
        except ImportError as e:
            pass

    return commands
Helper to look up a Google Chart API parameter for the given chart.
dataset/ETHPy150Open VikParuchuri/percept/percept/management/base.py/get_commands--crossover with--dataset/ETHPy150Open baz/app-sales-machine/lib/graphy/graphy_test.py/GraphyTest.Param