使用wxPython内嵌浏览器

代码

import wx
from wx.html2 import WebView


class MyHtmlFrame(wx.Frame):
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, -1, title, size=(1024, 768))
        web_view =WebView.New(self)
        web_view.LoadURL("http://fm.taihe.com/#")


app = wx.App()
frm = MyHtmlFrame(None, "Simple HTML Browser")
frm.Show()
app.MainLoop()

效果

posted @ 2018-11-28 11:20  abcyrf  阅读(2858)  评论(1编辑  收藏  举报