def insureWxApp():
"""Create an instance of PySimpleApp if there is no app already.
This is required by wxPython before creating any GUI objects.
"""
global _wxApp
_wxApp = wx.GetApp()
if not _wxApp:
_wxApp = wx.PySimpleApp()
return _wxApp
评论列表
文章目录