Get Python Tornado Version?

不羁的心 提交于 2019-12-23 08:49:10

问题


How do I get the current version of my python Tornado Module Version?

With other packages I can do the following:

print <modulename>.__version__

Source: How to check version of python modules?


回答1:


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.




回答2:


With no reference, or reason I tried the following:

print tornado.version

which seems to do the trick.




回答3:


If using Ubuntu open terminal type python , then import tornado, the write command tornado.version and u will get output like '4.2.1'



来源:https://stackoverflow.com/questions/31146153/get-python-tornado-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!