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


Python LooseVersion.parse方法代码示例

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


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

示例1: parse

# 需要导入模块: from distutils.version import LooseVersion [as 别名]
# 或者: from distutils.version.LooseVersion import parse [as 别名]
 def parse(self, vstring):
     LooseVersion.parse(self, vstring)
     self.int_version = list(filter(lambda x:isinstance(x, int),
                                    self.version))
开发者ID:zniper,项目名称:cookie-edge,代码行数:6,代码来源:post_gen_project.py

示例2: LooseVersion

# 需要导入模块: from distutils.version import LooseVersion [as 别名]
# 或者: from distutils.version.LooseVersion import parse [as 别名]
master_doc = 'index'

# General information about the project.
project = u'Python-Tempo'
copyright = u'2015, Andrew Pashkin'
author = u'Andrew Pashkin'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
_version = LooseVersion()

_version.parse(open(os.path.join(
  os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir, 'VERSION'
)).read().strip())

version = '.'.join([str(e) for e in _version.version][:2])
# The full version, including alpha/beta/rc tags.
release = _version.vstring

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
开发者ID:AndrewPashkin,项目名称:python-tempo,代码行数:33,代码来源:conf.py


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