刚刚学习python,想做个函数来动态控制弹出框的内容,如下:
[code="python"]import wx
class App(wx.App):
def OnInit(self):
dlg = wx.MessageDialog(None, "hello world", 'name', wx.YES_NO|wx.ICON_QUESTION)
result = dlg.ShowModal()
dlg.Destroy()
def alert():
app = App()
app.MainLoop()
alert()
[/code]
但是这里的hello world是写死的,name也是写死的,不知道怎么写alert()函数才能使得可以控制弹出框的参数呢?