当前位置: 首页>>代码示例>>Python>>正文


Python FileUtils.readDirectoryAll方法代码示例

本文整理汇总了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
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:11,代码来源:Universals.py

示例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
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:11,代码来源:Universals.py

示例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
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:14,代码来源:Universals.py

示例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
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:15,代码来源:Universals.py

示例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
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:15,代码来源:Universals.py


注:本文中的FileUtils.readDirectoryAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。