【发布时间】:2014-04-30 15:37:06
【问题描述】:
我正在尝试将 https url 加载到 HTMLWindow 中
import wx
import wx.html
class MyHtmlFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, -1, title, size=(600,400))
html = wx.html.HtmlWindow(self)
if "gtk2" in wx.PlatformInfo:
html.SetStandardFonts()
wx.CallAfter(html.LoadPage, "https://www.google.com")#Fails to load page
#but the following works ...
#wx.CallAfter(html.LoadPage, "http://www.google.com")#Works Fine!
app = wx.PySimpleApp()
frm = MyHtmlFrame(None, "Simple HTML Browser")
frm.Show()
app.MainLoop()
有没有办法在 HTMLWindow 中加载 ssl 页面(或其他一些 in-a-wxWindow 方式来呈现 ssl 页面)?
我正在使用 wx 2.8.10 ,目前升级不是一个真正的选择
【问题讨论】:
-
你能用
WebView代替吗? -
不幸的是没有,除非有一个 python 包可以给我(我使用的是 2.8.10,直到 2.9.3 才出现,并且不能真正更新......)
-
@lmjohns3 感谢您的灵感,看起来 iewin 可以正常工作,这有点相似(因为我在 Windows 上......我宁愿做一些更便携的东西,但是嗯)
标签: python ssl https wxwidgets wxhtmlwindow