本文整理汇总了Python中gui.Gui.after方法的典型用法代码示例。如果您正苦于以下问题:Python Gui.after方法的具体用法?Python Gui.after怎么用?Python Gui.after使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gui.Gui
的用法示例。
在下文中一共展示了Gui.after方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: elif
# 需要导入模块: from gui import Gui [as 别名]
# 或者: from gui.Gui import after [as 别名]
print '\n\n Highest emotion: ' + highest + '\n\n'
print 'Accumulated so far: '
print tweetprocessor.counts
# logger.logCounts(tweetprocessor.counts)
print '\n\n'
if (highest == 'happy'):
gui.setColor('green')
elif (highest == 'angry'):
gui.setColor('red')
elif (highest == 'sad'):
gui.setColor('blue')
elif (highest == 'profane'):
gui.setColor('orange')
# Do process again after 15 sec
_job = gui.after(QUERY_FREQ, searchEvent)
def quitCallback():
print "Exited."
gui.stopGui()
def get_string():
search_text = gui.search.get()
if len(search_text) > 0:
return search_text
if __name__ == '__main__':
gui = Gui(quitCallback,get_string)
_job = gui.after(QUERY_FREQ, searchEvent)
gui.mainloop()
示例2: countAndColor
# 需要导入模块: from gui import Gui [as 别名]
# 或者: from gui.Gui import after [as 别名]
countAndColor()
def countAndColor():
highest = tweetprocessor.calcHighest()
print '\n\n Highest emotion: ' + highest + '\n\n'
print 'Accumulated so far: '
print tweetprocessor.counts
print '\n\n'
if (highest == 'happy'):
gui.setColor('green')
elif (highest == 'angry'):
gui.setColor('red')
elif (highest == 'sad'):
gui.setColor('blue')
elif (highest == 'profane'):
gui.setColor('orange')
# Do process again after 15 sec
Timer(15, searchEvent).start()
def startAppThread():
thread = Thread(target = searchEvent())
thread.start()
thread.join()
if __name__ == '__main__':
gui.after(15000, startAppThread)
gui.mainloop()
#TODO logger.readTweetLogs()