webviewサンプル
<参考>
python – wxPython WebView example – Stack Overflow
wx webview event
import wx import wx.html2 class MyFrame(wx.Frame): def __init__(self, *args, **kw): super(MyFrame, self).__init__(*args, **kw) self.InitUI() def InitUI(self): self.current = "https://google.co.jp/" sizer = wx.BoxSizer(wx.VERTICAL) self.browser = wx.html2.WebView.New(self) self.Bind(wx.html2.EVT_WEBVIEW_LOADED, self.On_Web_View_Loaded, self.browser) sizer.Add(self.browser, 1, wx.EXPAND, 10) self.SetSizer(sizer) self.SetSize((1024, 768)) self.browser.LoadURL(self.current) def On_Web_View_Loaded(self, event): print('Loading') def main(): app = wx.App() ex = MyFrame(None) ex.Show() app.MainLoop() if __name__ == '__main__': main()
日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)