上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: <!DOCTYPE html><!--规定标准的html--><!--一个页在只有一对html标签--><!--标签的属性 指定英文--><html lang="en"><head> <!--自闭合标签 没有另一半 自动闭合 叫自闭合标签--> <!--主动闭合标签 有另一半叫主动闭合标签--> < 阅读全文
posted @ 2018-06-22 23:16 彼得潘jd 阅读(345) 评论(0) 推荐(1) 编辑
摘要: import unittestclass My(unittest.TestCase): def login(self): print('testa') cookies={'sign':'sngdsdfsf'} # self.assertEqual() #断言 return cookies def t 阅读全文
posted @ 2018-06-19 22:12 彼得潘jd 阅读(105) 评论(0) 推荐(0) 编辑
摘要: import unittest,requestsimport ddtfrom BeautifulReport import BeautifulReport as bffrom urllib import parse@ddt.ddtclass Login(unittest.TestCase): bas 阅读全文
posted @ 2018-06-19 22:11 彼得潘jd 阅读(211) 评论(0) 推荐(0) 编辑
摘要: import unittestdef calc(a,b): return round(a/b,1)res=calc(1,2)calc()calc('s','22')calc(1,0)import unittestdef calc(a,b): return round(a/b,1)class Test 阅读全文
posted @ 2018-06-19 22:10 彼得潘jd 阅读(152) 评论(0) 推荐(0) 编辑
摘要: from nnlog import Logger# log=Logger(file_name='my.log',level='debug',# when='S',backCount=5,interval=1) #可以修改原设置参数log=Logger('jd.log')log.debug('test 阅读全文
posted @ 2018-06-19 22:09 彼得潘jd 阅读(116) 评论(0) 推荐(0) 编辑
摘要: import loggingfrom logging import handlersclass MyLogger(): def __init__(self,file_name,level='info',backCount=5,when='D'): logger = logging.getLogger 阅读全文
posted @ 2018-06-01 11:29 彼得潘jd 阅读(135) 评论(0) 推荐(0) 编辑
摘要: import multiprocessing,threadingdef my(): print('哈哈哈')def run(num): for i in range(num): t=threading.Thread(target=my) t.start()if __name__ == '__main 阅读全文
posted @ 2018-06-01 11:28 彼得潘jd 阅读(82) 评论(0) 推荐(0) 编辑
摘要: import logginglogging.basicConfig(level=logging.DEBUG,#控制台打印的日志级别 filename='my.log', filemode='a', #w清空以前的日志,重新写入,a在文件里面追加 format= '%(asctime)s - %(pa 阅读全文
posted @ 2018-06-01 11:28 彼得潘jd 阅读(133) 评论(0) 推荐(0) 编辑
摘要: import threading,timedef run(): time.sleep(3) print('哈哈哈')for i in range(50): t = threading.Thread(target=run) t.setDaemon(True) #把子线程设置成守护线程 (主线程一死,守 阅读全文
posted @ 2018-06-01 11:26 彼得潘jd 阅读(78) 评论(0) 推荐(0) 编辑
摘要: import threading,timedef run(): time.sleep(3) print('哈哈哈')start_time=time.time()threads=[] #存放启动的5个线程for i in range(5): t = threading.Thread(target=ru 阅读全文
posted @ 2018-06-01 11:25 彼得潘jd 阅读(73) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页