Python Fltk win.show()不显示

Python Fltk win.show()不显示,python,function,fltk,Python,Function,Fltk,我无法让fltk窗口显示你的手。Fl.show()是否必须在函数外部?这是我的纸牌游戏程序的一部分 def makecards(Fl_Return_Button): global c yourhand=Fl_Window(100,100,1300,145,'Your Cards') yourhand.begin() for x in range(NUM_CARDS): while True: cv = random.rand

我无法让fltk窗口显示你的手。Fl.show()是否必须在函数外部?这是我的纸牌游戏程序的一部分

def makecards(Fl_Return_Button):
    global c
    yourhand=Fl_Window(100,100,1300,145,'Your Cards')
    yourhand.begin()
    for x in range(NUM_CARDS):
        while True:
            cv = random.randint(2,14)#value
            cs = random.randint(0,3)#suit

            if (cv, cs) not in hand:
                break
        hand.append((cv, cs))
        c+=100
        b=Fl_Button(c,0,100,140)
        b.label(str(SUITS[cs][1]))
        order=Fl_Input(210,250,80,40)
        submit=Fl_Return_Button(210,300,80,40,'Submit')
        b.redraw()
    yourhand.end()
    yourhand.show()
你在某处调用Fl.run()吗?你在某处调用Fl.run()吗?