本文整理汇总了Python中fsgs.FSGSDirectories.FSGSDirectories.get_plugins_dir方法的典型用法代码示例。如果您正苦于以下问题:Python FSGSDirectories.get_plugins_dir方法的具体用法?Python FSGSDirectories.get_plugins_dir怎么用?Python FSGSDirectories.get_plugins_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fsgs.FSGSDirectories.FSGSDirectories
的用法示例。
在下文中一共展示了FSGSDirectories.get_plugins_dir方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: app_main
# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_plugins_dir [as 别名]
def app_main():
FSGSDirectories.initialize()
Settings.instance().load()
print("")
print("Directories:")
print("* base_dir =", FSGSDirectories.get_base_dir())
print("* cache_dir =", FSGSDirectories.get_cache_dir())
print("* cdroms_dir =", FSGSDirectories.get_cdroms_dir())
print("* configurations_dir =", FSGSDirectories.get_configurations_dir())
print("* controllers_dir =", FSGSDirectories.get_controllers_dir())
print("* covers_dir =", FSGSDirectories.get_covers_dir())
print("* data_dir =", FSGSDirectories.get_data_dir())
print("* downloads_dir =", FSGSDirectories.downloads_dir())
print("* floppies_dir =", FSGSDirectories.get_floppies_dir())
print("* hard_drives_dir =", FSGSDirectories.get_hard_drives_dir())
# print("* images_dir =", FSGSDirectories.get_images_dir())
print("* kickstarts_dir =", FSGSDirectories.get_kickstarts_dir())
print("* launcher_dir =", FSGSDirectories.get_launcher_dir())
print("* logs_dir =", FSGSDirectories.get_logs_dir())
print("* plugins_dir =", FSGSDirectories.get_plugins_dir())
# print("* portable_dir =", FSGSDirectories.portable_dir())
print("* save_states_dir =", FSGSDirectories.get_save_states_dir())
print("* screenshots_dir =", FSGSDirectories.get_screenshots_dir())
print("* screenshots_output_dir =", FSGSDirectories.screenshots_output_dir())
print("* themes_dir =", FSGSDirectories.get_themes_dir())
print("* titles_dir =", FSGSDirectories.get_titles_dir())
print("* whdload_dir =", FSGSDirectories.get_whdload_dir())
print("")
示例2: plugin_path
# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_plugins_dir [as 别名]
def plugin_path(cls):
result = []
plugins_dir = FSGSDirectories.get_plugins_dir()
if plugins_dir and os.path.isdir(plugins_dir):
result.append(plugins_dir)
expansion_dir = os.path.join(
FSGSDirectories.get_base_dir(), "Workspace", "Expansion"
)
if expansion_dir and os.path.isdir(expansion_dir):
result.append(expansion_dir)
if System.macos:
system_plugins_dir = os.path.join(
fsboot.executable_dir(),
"..",
"..",
"..",
"..",
"..",
"..",
"Plugins",
)
else:
system_plugins_dir = os.path.join(
fsboot.executable_dir(), "..", "..", "..", "Plugins"
)
if os.path.isdir(system_plugins_dir):
result.append(system_plugins_dir)
return result
示例3: plugin_path
# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_plugins_dir [as 别名]
def plugin_path(cls):
result = []
plugins_dir = FSGSDirectories.get_plugins_dir()
if plugins_dir and os.path.isdir(plugins_dir):
result.append(plugins_dir)
expansion_dir = os.path.join(
FSGSDirectories.get_base_dir(), "Workspace", "Expansion")
if expansion_dir and os.path.isdir(expansion_dir):
result.append(expansion_dir)
return result
示例4: load_plugins
# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_plugins_dir [as 别名]
def load_plugins(cls):
if cls._plugins_loaded:
return
cls._plugins_loaded = True
plugins_dir = FSGSDirectories.get_plugins_dir()
if plugins_dir:
dont_write_bytecode = sys.dont_write_bytecode
try:
cls._load_plugins(plugins_dir)
finally:
sys.dont_write_bytecode = dont_write_bytecode
示例5: find_plugins
# 需要导入模块: from fsgs.FSGSDirectories import FSGSDirectories [as 别名]
# 或者: from fsgs.FSGSDirectories.FSGSDirectories import get_plugins_dir [as 别名]
def find_plugins():
plugins = []
plugins_dir = FSGSDirectories.get_plugins_dir()
if plugins_dir is None:
return plugins
for item in os.listdir(plugins_dir):
plugin_dir = os.path.join(plugins_dir, item)
if not os.path.isdir(plugin_dir):
continue
if os.path.exists(os.path.join(plugin_dir, "disabled")):
continue
plugins.append(plugin_dir)
return plugins