简体   繁体   中英

Get Python Tornado Version?

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?

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.

With no reference, or reason I tried the following:

print tornado.version

which seems to do the trick.

如果使用Ubuntu打开终端类型python ,然后import tornado ,写命令tornado.version和u将获得类似'4.2.1'输出

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM