摘要:
time >>> print time.strftime("%Y-%m-%d")2017-02-20>>> print time.strftime("%Y-%m-%d %H:%M:%S")2017-02-20 17:23:45 print time.strftime("%Y-%m-%d %H:%M: 阅读全文
posted @ 2017-02-20 17:43
LV_VL
阅读(149)
评论(0)
推荐(0)
摘要:
import logging logger=logging.logging.getLogger('test-log')#全局定义日志输出的名字 logger.setLevel(logging.DEBUG)#全局定义屏幕输出.文件输出的日志最低级别 ch = logging.StreamHandler 阅读全文
posted @ 2017-02-20 14:45
LV_VL
阅读(131)
评论(0)
推荐(0)
摘要:
r:读 w:写(最好不用,清空文件写) a: 追加 r+ 读写 w+ 写读(最好不用,清空文件写) a+ 追加 读 read():全部读 readline():读一行 readlines():全部读并且以列表的形式展现 f.seek(10) 从光标的位置开始移动到第十位(按照字符的方式移动光标) f 阅读全文
posted @ 2017-02-20 12:57
LV_VL
阅读(156)
评论(0)
推荐(0)