如下代码内容是关于python从列表中选择的对话框定义的代码,应该能对码农们有所帮助。

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()