获取Python Tornado版本? [英] Get Python Tornado Version?
本文介绍了获取Python Tornado版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取python Tornado模块版本的当前版本?
How do I get the current version of my python Tornado Module Version?
对于其他软件包,我可以执行以下操作:
With other packages I can do the following:
print <modulename>.__version__
来源: 如何检查python模块的版本?
推荐答案
Tornado同时具有tornado.version
和tornado.version_info
,这是一个供人们食用的字符串(当前为"4.2"),而tornado.version_info
是一个数字元组,更好地用于程序比较(当前为(4, 2, 0, 0)
).对于Beta和其他预发行版,version_info
的第四个值将为负.
Tornado has both tornado.version
, which is a string for human consumption (currently "4.2"), and tornado.version_info
, which is a numeric tuple that is better for programmatic comparisons (currently (4, 2, 0, 0)
). The fourth value of version_info
will be negative for betas and other pre-releases.
这篇关于获取Python Tornado版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文