摘要: import logging import sys def setup_logger(name, logfile, level): log_format = logging.Formatter('%(asctime)s %(levelname)s %(name)s %(filename)s:%(lineno)d [%(funcName)s]: ' ... 阅读全文
posted @ 2018-02-28 14:10 tlmn2008 阅读(490) 评论(0) 推荐(0) 编辑
摘要: urllib.urlencode: 把字典组合成url import urllib >>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})>>> print paramseggs=2&bacon=0&spam=1 subpr 阅读全文
posted @ 2018-02-26 10:49 tlmn2008 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/ea827390b47a 阅读全文
posted @ 2018-02-12 15:53 tlmn2008 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 转自:http://python.jobbole.com/81546/ threading.Thread Thread 是threading模块中最重要的类之一,可以使用它来创建线程。有两种方式来创建线程:一种是通过继承Thread类,重写它的run方法;另一种是创建一个threading.Thre 阅读全文
posted @ 2018-02-09 13:49 tlmn2008 阅读(137) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/pengyingh/articles/6586760.html 阅读全文
posted @ 2017-12-06 10:21 tlmn2008 阅读(88) 评论(0) 推荐(0) 编辑
摘要: https://taizilongxu.gitbooks.io/stackoverflow-about-python/content/index.html 阅读全文
posted @ 2017-12-05 16:10 tlmn2008 阅读(76) 评论(0) 推荐(0) 编辑
摘要: #! /bin/sh # The script is used for test log collection. function usage() { echo " Usage: $0 node_type start/stop case_number Example: $0... 阅读全文
posted @ 2017-10-31 15:51 tlmn2008 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #! /bin/sh # The script is used for test log collection. #usage step: #1 configure db's info. (./logcollect.sh db) #2 run script to copy DB log to current server #3 start to collect l... 阅读全文
posted @ 2017-10-31 15:32 tlmn2008 阅读(629) 评论(0) 推荐(0) 编辑
摘要: static关键字 static 关键字可以用来修饰类的变量,方法和内部类。static 是静态的意思,也是全局的意思。它定义的东西,属于全局与类相关,不与具体实例相关。就是说它调用的时候,只是 ClassName.method(),而不是 new ClassName().method()。new 阅读全文
posted @ 2017-05-17 17:07 tlmn2008 阅读(167) 评论(0) 推荐(0) 编辑
摘要: From https://zhidao.baidu.com/question/32981916.html 阅读全文
posted @ 2017-05-02 10:00 tlmn2008 阅读(256) 评论(0) 推荐(0) 编辑