Python
L博涯
岁月不饶人,我亦何曾饶过岁月!
展开
-
linux python2.6.6升级到python2.7
CentOS 6 系统默认 Python 版本是:2.6.6 平时在使用中遇到很多的库要求是 2.7.x 版本的库,比如使用 ConfigParser 库,在 2.6 版本库就不支持没有 value 值的配置项,需要升级到 2.7 以上的库才行,这次就尝试升级一下 Python 到 2.7.x 版本,记录于此。 一、升级 Python 2.7.10 版本 1. 准备安装包,系统是最小化安装 ...转载 2019-03-20 15:15:10 · 346 阅读 · 0 评论 -
linux python time模块使用
import time # 时间戳转时间格式(2018-06-08 18:00:00) def trantime(maxclock): x = time.localtime(maxclock) timeclock = time.strftime('%Y-%m-%d %H:%M:%S',x) return timeclock # 时间戳转时间格式(2018-06-08) ...原创 2019-03-20 16:28:34 · 618 阅读 · 0 评论