这学期我上了一门网络编程课程,我的项目包括一个有简单图形界面的智力竞赛游戏。在
我想显示的问题,它将像球员点击按钮回答。在
问题是,我不知道如何在python中对"wait for click"进行编码,代码将一直执行到最后。在
我试着用一段时间来处理boolean条件(如果没有单击,则等待),这是我想要的等待,但没有显示图形界面。。。在
这是我的密码,我有点绝望
提前谢谢你的帮助。在import numpy as np
from numpy.random import shuffle
from random import randint
import socket
import time
from Tkinter import *
from time import clock
class Interface(Frame):
def __init__(self, fenetre, **kwargs):
Frame.__init__(self, fenetre, width=768, height=576, **kwargs)
self.pack(fill=BOTH)
#DATAS
self.question = ["What is the capital of France?","In which continent is Argentina?","Where is Big Ben?","What is the most densely populated country?","What language do they speak in Brazil?"]</