Esempio n. 1
0
	def on_created(self,event):
		global quiz
		if event.src_path.split('/')[-1] == 'findQuiz':
			with open('question-zh.hortor.net/question/bat/findQuiz', encoding='utf-8') as f:
				quiz=read_question(f)
		elif event.src_path.split('/')[-1] == 'choose':
			sql.sql_write(quiz)
Esempio n. 2
0
 def on_created(self, event):
     global quiz
     if event.src_path.split('/')[-1] == 'findQuiz':
         with open('question-zh.hortor.net/question/bat/findQuiz',
                   encoding='utf-8') as f:
             quiz = read_question(f)
     elif event.src_path.split('/')[-1] == 'choose':
         sql.sql_write(quiz)
Esempio n. 3
0
	def on_created(self,event):
		global quiz
		if event.src_path.split('/')[-1] == 'findQuiz':
			with open('question-zh.hortor.net/question/bat/findQuiz', encoding='utf-8') as f:
				quiz=read_question(f)
		elif event.src_path.split('/')[-1] == 'choose':
			sql.sql_write(quiz)
		elif event.src_path.split('/')[-1] == 'fightResult':
			print('本局结束')
			time.sleep(3)
			adbshell.back()
			time.sleep(3)
			adbshell.tap('start')
Esempio n. 4
0
	def on_created(self,event):
		global quiz
		if event.src_path.split('/')[-1] == 'findQuiz':
			with open('question.hortor.net/question/bat/findQuiz', encoding='utf-8') as f:
				quiz=read_question(f)
		elif event.src_path.split('/')[-1] == 'choose':
			sql.sql_write(quiz)
		elif event.src_path.split('/')[-1] == 'fightResult':
			print('本局结束')
			time.sleep(3)
			adbshell.back()
			time.sleep(3)
			adbshell.tap('start')
Esempio n. 5
0
 def on_created(self, event):
     global quiz
     if event.is_directory:
         print("directory created:{0}".format(event.src_path))
     else:
         file_name = event.src_path.split('/')[-1]
         if  file_name == 'findQuiz':
             with open('question.hortor.net/question/bat/findQuiz', encoding='utf-8') as findQuiz:
                 quiz = get_question(findQuiz)
         elif file_name == 'choose':
             with open('question.hortor.net/question/bat/choose', encoding='utf-8') as choose:
                 sql.sql_write(quiz)
         elif file_name == 'fightResult':
             tap.next_quiz()