본문 바로가기

개발자 모드/파이썬(python)

파이썬 wx.SingleChoiceDialog 예제

728x90
import wx

if __name__ == '__main__':
    app = wx.PySimpleApp()
    dlg = wx.SingleChoiceDialog(None,
        'What version of Python are you using?',
        'Single Choice',
        ['1.5.2', '2.0', '2.1.3', '2.2', '2.3.1'])
    if dlg.ShowModal() == wx.ID_OK:
        response = dlg.GetStringSelection()
 
    print(response)
    dlg.Destroy()
    app.MainLoop()

 

실행 결과

 

IDLE Shell

 

728x90