def get_plugins_from_dir(dir_path, classbase):
if dir_path == "<STR_LIT>":<EOL><INDENT>dir_path = os.path.abspath(<EOL>os.path.join(os.path.dirname(__file__), '<STR_LIT>'))<EOL>dir_plugins = get_plugins(dir_path)<EOL>return {"<STR_LIT>": dir_path, "<STR_LIT>": dir_plugins, "<STR_LIT:class>": classbase}<EOL><DEDENT>if dir_path == "<STR_LIT:.>":<EOL><INDENT>dir_path = os.path.expanduser(<EOL>os.path.expandvars(os.path.join(os.getcwd(), '<STR_LIT>')))<EOL>dir_plugins = get_plugins(dir_path)<EOL>return {"<STR_LIT>": dir_path, "<STR_LIT>": dir_plugins, "<STR_LIT:class>": classbase}<EOL><DEDENT>else:<EOL><INDENT>dir_path = os.path.expanduser(os.path.expandvars(dir_path))<EOL>prefix = "<STR_LIT>".format(dir_path, classbase)<EOL>user_path = "<STR_LIT>".format(prefix)<EOL>create_dir(user_path)<EOL>create_file("<STR_LIT>".format(prefix))<EOL>create_file("<STR_LIT>".format(prefix))<EOL>sys.path.append(os.path.expanduser(dir_path))<EOL>dir_plugins = get_plugins(user_path)<EOL>return {"<STR_LIT>": dir_path, "<STR_LIT>": dir_plugins, "<STR_LIT:class>": classbase}<EOL><DEDENT>
dir_path/classbase/plugins