Example #1
0
 def begin_draw(self,event):
     try:
         if self.result_file  and self.names_file and self.dates_file:
             draw.begin_draw(self.names_file, self.dates_file, self.result_file)
             self.place_of_answer.SetLabel("Done! Go to see: %s file" % self.result_file)
     except AttributeError,e :
         self.place_of_answer.SetLabel("Error, missing some file path: %s" % e)
Example #2
0
	def do_POST(s):
		"""Respond to a POST request."""
		print 'a'
		if s.path == '/execute':
			json = draw.begin_draw()

		s.send_response(200)
		s.send_header("Content-type", "text/json")
		s.end_headers()

		json2 = json.encode('utf-8')
		s.wfile.write(json2)