本文整理汇总了Python中platform.java_ver方法的典型用法代码示例。如果您正苦于以下问题:Python platform.java_ver方法的具体用法?Python platform.java_ver怎么用?Python platform.java_ver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类platform
的用法示例。
在下文中一共展示了platform.java_ver方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_java_ver
# 需要导入模块: import platform [as 别名]
# 或者: from platform import java_ver [as 别名]
def test_java_ver(self):
res = platform.java_ver()
if sys.platform == 'java':
self.assertTrue(all(res))
示例2: execute
# 需要导入模块: import platform [as 别名]
# 或者: from platform import java_ver [as 别名]
def execute(self, args, console):
print('architecture:', platform.architecture()[0])
print('java_ver:', platform.java_ver())
print('node:', platform.node())
print('processor:', platform.processor())
print('python_compiler:', platform.python_compiler())
print('python_implementation:', platform.python_implementation())
print('python_version:', platform.python_version())
print('release:', platform.release())
示例3: test_java_ver
# 需要导入模块: import platform [as 别名]
# 或者: from platform import java_ver [as 别名]
def test_java_ver(self):
res = platform.java_ver()
示例4: get_java_version
# 需要导入模块: import platform [as 别名]
# 或者: from platform import java_ver [as 别名]
def get_java_version(version=None):
# returns (1, 8, 0, 121) for version = "1.8.0_121", meaning
# Java 8 update 121, etc.. Conforms to:
# http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html
# and not yet http://openjdk.java.net/jeps/223 .
if version is None:
version = platform.java_ver()[0]
parse = re.match("(\d+)\.(\d+)\.(\d+)_(\d+)", version)
if parse:
return tuple((int(x) for x in parse.groups()))
else:
return ()