本文整理汇总了Python中FileUtils.readDirectoryAll方法的典型用法代码示例。如果您正苦于以下问题:Python FileUtils.readDirectoryAll方法的具体用法?Python FileUtils.readDirectoryAll怎么用?Python FileUtils.readDirectoryAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUtils
的用法示例。
在下文中一共展示了FileUtils.readDirectoryAll方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getMyPluginsNames
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import readDirectoryAll [as 别名]
def getMyPluginsNames():
plugins = []
for name in fu.readDirectoryAll(fu.joinPath(fu.HamsiManagerDirectory, "MyPlugins")):
try:
if (name[:1] != "." and name[:2] != "__" and name[-2:] != "__" and
fu.isDir(fu.joinPath(fu.HamsiManagerDirectory, "MyPlugins", name))):
plugins.append(name)
except: pass
return plugins
示例2: getInstalledThemes
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import readDirectoryAll [as 别名]
def getInstalledThemes():
themes = []
for name in fu.readDirectoryAll(fu.joinPath(fu.HamsiManagerDirectory, "Themes")):
try:
if (name[:1] != "." and name[:2] != "__" and name[-2:] != "__" and
fu.isDir(fu.joinPath(fu.HamsiManagerDirectory, "Themes", name))):
themes.append(name)
except: pass
return themes
示例3: getTaggersMachineNames
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import readDirectoryAll [as 别名]
def getTaggersMachineNames():
taggers = []
for name in fu.readDirectoryAll(fu.joinPath(fu.HamsiManagerDirectory, "Taggers")):
try:
moduleName = name.split(".")[0]
moduleNameExt = name.split(".")[1]
if taggers.count(moduleName) == 0:
if (name[:1] != "." and moduleName != "__init__" and ["py", "pyc", "pyd"].count(moduleNameExt) == 1 and
fu.isFile(fu.joinPath(fu.HamsiManagerDirectory, "Taggers", name))):
taggers.append(moduleName)
except: pass
return taggers
示例4: getInstalledLanguagesNames
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import readDirectoryAll [as 别名]
def getInstalledLanguagesNames():
global installedLanguagesNames
if installedLanguagesNames is None:
languages = []
for name in fu.readDirectoryAll(fu.joinPath(fu.HamsiManagerDirectory, "Languages")):
if fu.isFile(fu.joinPath(fu.HamsiManagerDirectory, "Languages", name)) and name[-3:] == ".qm":
langCode = name[-8:-3]
if languages.count(str(MQtCore.QLocale.languageToString(MQtCore.QLocale(langCode).language()))) == 0:
languages.append(str(MQtCore.QLocale.languageToString(MQtCore.QLocale(langCode).language())))
if languages.count("English") == 0:
languages.append("English")
installedLanguagesNames = languages
return installedLanguagesNames
示例5: getInstalledLanguagesCodes
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import readDirectoryAll [as 别名]
def getInstalledLanguagesCodes():
global installedLanguagesCodes
if installedLanguagesCodes is None:
languages = []
for name in fu.readDirectoryAll(fu.joinPath(fu.HamsiManagerDirectory, "Languages")):
if fu.isFile(fu.joinPath(fu.HamsiManagerDirectory, "Languages", name)) and name[-3:] == ".qm":
langCode = name[-8:-3]
if languages.count(langCode) == 0:
languages.append(langCode)
if languages.count("en_GB") == 0:
languages.append("en_GB")
installedLanguagesCodes = languages
return installedLanguagesCodes