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


Python platform.lower方法代码示例

本文整理汇总了Python中platform.lower方法的典型用法代码示例。如果您正苦于以下问题:Python platform.lower方法的具体用法?Python platform.lower怎么用?Python platform.lower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在platform的用法示例。


在下文中一共展示了platform.lower方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def __init__(self, interpreter, abi, platform):
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower() 
开发者ID:pantsbuild,项目名称:pex,代码行数:6,代码来源:tags.py

示例2: _interpreter_name

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def _interpreter_name():
    name = platform.python_implementation().lower()
    return INTERPRETER_SHORT_NAMES.get(name) or name 
开发者ID:pantsbuild,项目名称:pex,代码行数:5,代码来源:tags.py

示例3: __init__

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def __init__(self, interpreter, abi, platform):
        # type: (str, str, str) -> None
        self._interpreter = interpreter.lower()
        self._abi = abi.lower()
        self._platform = platform.lower() 
开发者ID:pypa,项目名称:pipenv,代码行数:7,代码来源:tags.py

示例4: interpreter_name

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def interpreter_name():
    # type: () -> str
    """
    Returns the name of the running interpreter.
    """
    try:
        name = sys.implementation.name  # type: ignore
    except AttributeError:  # pragma: no cover
        # Python 2.7 compatibility.
        name = platform.python_implementation().lower()
    return INTERPRETER_SHORT_NAMES.get(name) or name 
开发者ID:pypa,项目名称:pipenv,代码行数:13,代码来源:tags.py

示例5: is_unix_like

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def is_unix_like(platform=None):
    """Returns whether the given platform is a Unix-like platform with the usual
    Unix filesystem. When the parameter is omitted, it defaults to ``sys.platform``
    """
    platform = platform or sys.platform
    platform = platform.lower()
    return (
        platform.startswith("linux")
        or platform.startswith("darwin")
        or platform.startswith("cygwin")
    ) 
开发者ID:igraph,项目名称:python-igraph,代码行数:13,代码来源:setup.py

示例6: CleanFiles

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def CleanFiles(currentPath, platform):
    import os, glob
    
    if  platform.lower() == "windows":
        if len(filter(os.path.isfile, glob.glob('./*.pyc'))) > 0:
            os.system('del /q "' + currentPath + '*.pyc"')
        if len(filter(os.path.isfile, glob.glob('./*.pyo'))) > 0:            
            os.system('del /q "' + currentPath + '*.pyo"')
    else:
        os.system("rm -rf " + currentPath + "*.pyc")
        os.system("rm -rf " + currentPath + "*.pyo") 
开发者ID:gavazquez,项目名称:ReloadCam,代码行数:13,代码来源:ReloadCam_Main.py

示例7: Main

# 需要导入模块: import platform [as 别名]
# 或者: from platform import lower [as 别名]
def Main(customClines, cccamPath, cccamBin):
    import sys, os, optparse, ReloadCam_Arguments, platform, traceback, sys

    try:
        clines = []

        parser = optparse.OptionParser(description="Refrescador automatico de clines. Creado por Dagger")
        
        possibleArguments = '%s' % ','.join(map(str, ReloadCam_Arguments.Arguments))

        parser.add_option('-s', '--server', dest='web', action='append', choices=ReloadCam_Arguments.Arguments,
            help="Especifica la web de la que quieres descargar las clines. Puedes repetir este parametro varias \
                veces o usar ALL para llamar a todos o ALLTF para todos menos testious y feecline. Valores posibles: " + possibleArguments)

        parser.add_option('-o', '--oscam', dest='oscam', help='Traduce el cccam.cfg a formato OSCAM y lo guarda en la ruta que le indiques')

        parser.add_option('-r', '--norestart', dest='norestart', default=False, action='store_true', 
            help='NO reinicia la cccam despues del refresco de clines')

        parser.add_option('-n', '--nodownload', dest='nodownload', default=False, action='store_true', 
            help='NO descarga nuevas lineas. Solo reordena por ping y elimina las lineas que no funcionan')

        (opts, args) = parser.parse_args()

        if opts.nodownload is True and opts.web is not None:
            print "Cannot call with -s and -n at the same time"
            return;
        
        if opts.nodownload is False:
            clines = GetClinesByArgument(opts.web, customClines)
            if len(clines) <= 0:
                print "CAUTION! No new lines retrieved"
    
        WriteCccamFile(clines, cccamPath)

        if opts.oscam is not None:
            TransformToOscamFile(opts.oscam, cccamPath)

        if opts.norestart is False and platform.system().lower() != "windows":
            print "Restarting cam!"
            RestartCccam(cccamBin)
        print "Finished!!!"

    except Exception,e:
        print "Unexpected error thrown in ReloadCam_Main: " + str(e)
        traceback.print_exc(file=sys.stdout) 
开发者ID:gavazquez,项目名称:ReloadCam,代码行数:48,代码来源:ReloadCam_Main.py


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