def init(self,cr): tools.sql.drop_view_if_exists(cr, 'custrom_product_infomation_report') cr.execute(""" create or replace view custrom_product_infomation_report as ( select t0.id,t0.hpartner_id as hpartner_id, t0.khwl_code as khwl_code,t1.…
python性能对比之items #1 #-*- coding:utf8-*- import datetime road_nodes = {} for i in range(5000000): road_nodes[i] = {'id':i} beg_time = datetime.datetime.now() for key, val in road_nodes.items(): pass end_time = datetime.datetime.now() print "time_scan:…
1.获取当前时间的两种方法: import datetime,time now = time.strftime("%Y-%m-%d %H:%M:%S") print now now = datetime.datetime.now() print now 2.获取上个月最后一天的日期(本月的第一天减去1天) last = datetime.date(datetime.date.today().year,datetime.date.today().month,1)-datetime.tim…