def find_all_commands(management_dir):
    """
    Find all valid commands in a directory
    management_dir : directory path
    return - List of commands
    """
    try:
        #Find all commands in the directory that are not __init__.py and end in .py.  Then, remove the trailing .py
        return [f[:-3] for f in os.listdir(management_dir) if f.endswith('.py') and not f.startswith("__")]
    except __HOLE__:
        #If nothing is found, return empty
        return []
dataset/ETHPy150Open VikParuchuri/percept/percept/management/base.py/find_all_commands