示例#1
0
	def __init__(self):
		WorkUnit.__init__(self)
		self.msgs = []
		self.st_info_list = []
		self.id_code_map = {}
		self.alert = alert_thd.MsgAlert()
		self.alert.start()
		
		self.inputthd = alert_thd.InputThd(self)
		self.inputthd.start()
		self.cont_type = (cont_type_stock)
		self.last_cont_type = cont_type_stock
		
		self.exit_sleep = False
		self.history_file = file('history.tmp', 'w+')
		
		self.flag = None 
		self.vb = True
		
		now = datetime.datetime.now()
		d_start = now.replace(hour=9, minute=30, second=0 , microsecond=0)
		
		td = datetime.timedelta(hours=2)
		td3 = datetime.timedelta(minutes=2)
		self.morning = (d_start , d_start + td + td3)
		
		td2 = datetime.timedelta(minutes=90)
		self.noon = (d_start + td2 + td, d_start + td2 + td + td + td3)
		
		self.hpconvertor = Hanzi2Pinyin()
示例#2
0
	def __init__(self):
		WorkUnit.__init__(self)
		self.sinfoc_home = os.getenv("SINFOC_HOME", None)
		if self.sinfoc_home == None:
			print "[Error] SINFOC_HOME is not defined!"
			sys.exit(-1)
		print "[INFO] SINFOC_HOME:", self.sinfoc_home
示例#3
0
 def __init__(self):
     WorkUnit.__init__(self)