def get_sorted_scene_names(module_name): module = get_module(module_name) line_to_scene = {} for name, scene_class in inspect.getmembers(module, is_scene): lines, line_no = inspect.getsourcelines(scene_class) line_to_scene[line_no] = name return [line_to_scene[line_no] for line_no in sorted(line_to_scene.keys())]
def get_sorted_scene_classes(module_name): module = get_module(module_name) line_to_scene = {} for name, scene_class in inspect.getmembers(module, is_scene): if inspect.getmodule(scene_class) != module: continue lines, line_no = inspect.getsourcelines(scene_class) line_to_scene[line_no] = scene_class return [line_to_scene[index] for index in sorted(line_to_scene.keys())]
def get_sorted_scene_names(module_name): module = get_module(module_name) line_to_scene = {} for name, scene_class in inspect.getmembers(module, is_scene): lines, line_no = inspect.getsourcelines(scene_class) line_to_scene[line_no] = name return [ line_to_scene[line_no] for line_no in sorted(line_to_scene.keys()) ]
def get_sorted_scene_classes(module_name): module = get_module(module_name) line_to_scene = {} for name, scene_class in inspect.getmembers(module, is_scene): if inspect.getmodule(scene_class) != module: continue lines, line_no = inspect.getsourcelines(scene_class) line_to_scene[line_no] = scene_class return [ line_to_scene[index] for index in sorted(line_to_scene.keys()) ]