python threads,threading的用法

import threading,time from time import ctime,sleep class A(object): def b(self): print ctime() time.sleep(3) print ctime() def c(self): print ctime() time.sleep(4) print ctime() def process(self): #args是关键字参数,需要加上名字,写...
公司 | 2016-10-27 12:39 | 阅读 39576 次 | 评论 0 条

python去掉每行中的换行符 取整数范围

eslid = open(r"D:\test.txt").readlines() for line in eslid: line = line.strip('\n') print server.send_cmd('ESL_QUERY_REALTIME',[{"eslid":line}]) def jb1(self): print 'jb1 start' +ctime() n = 0 jb1_eslid = open(r".\118.txt").readlines() #数据格式为eslid+sku。中间不需...
python | 2016-10-19 10:27 | 阅读 46023 次 | 评论 0 条

用例的使用方法

if __name__ == '__main__': # unittest.main() try: # 跑一个class # suite1 = unittest.TestLoader().loadTestsFromTestCase(HELLO) # suite1 = unittest.TestLoader().loadTestsFromTestCase(SALES_QUERY_ACK) # suite1 = unittest.TestLoader().loadTestsFromTestCase(UNBIND) # suite1 = unittest....
公司 | 2016-10-18 21:29 | 阅读 103303 次 | 评论 0 条

esl_working测试用例脚本

#-*- coding:UTF-8 -*- import sys, unittest, xmlrpclib, time, socket, select, multiprocessing , random,sqlite3 from main import database import esl_init from main import create_task_data from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandl...
公司 | 2016-10-18 21:28 | 阅读 64259 次 | 评论 0 条

python set

# -*- coding:utf-8 -*- import time,difflib,sys fa = open('D:\HS_B_02.txt') a = fa.readlines() fa.close() fb = open('D:\\hs_goods_esl_pr.txt') b = fb.readlines() fb.close() c = [i for i in a if i not in b] fc = open('D:\C.txt', 'w') fc.writelines(c) fc.close() set.intersection(...
公司 | 2016-10-18 10:45 | 阅读 2365 次 | 评论 0 条

python 操作sqlservice

# -*- coding:utf-8 -*- import sys,pymssql ''' try: conn = pymssql.connect(host="192.168.2.109",user="hanshow",password="hanshow", database="yonghui1") except pymssql.OperationalError, msg: print "error: Could not Connection SQL Server!please check your dblink configure!" sy...
公司 | 2016-10-13 15:54 | 阅读 70235 次 | 评论 0 条

python request

#-*- coding:UTF-8 -*- # import sys, unittest, xmlrpclib, time, socket, select, multiprocessing , random,sqlite3,re,unicodedata,requests,time,json from main import database import esl_init from main import create_task_data from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCS...
公司 | 2016-10-12 15:31 | 阅读 108228 次 | 评论 0 条
浏览2354300次