All pastes #676986 Raw Edit

Unnamed

public text v1 · immutable
#676986 ·published 2007-08-31 15:50 UTC
rendered paste body
	previousTStamp = strftime("%B %a %d", localtime())
	command_log = open('%s.log'%(previousTStamp),'a+')
	
	def TStamp(self, txt):
		currentTStamp = strftime("%B %a %d", localtime())
		if currentTStamp is not previousTStamp:
			self.command_log.close()
			self.command_log = open('%s.log'%(currentTStamp),'a+)
		stamp = strftime("%H %M", localtime())
		logText = '%s : %s\n'%(stamp, txt)
		self.command_log.write(logText)
		self.command_log.flush()
		print logText