I found this snippet on internet and this worked fine:
*
*import wx.html2*
*class MyBrowser(wx.Dialog):*
*def __init__(self, *args, **kwds):*
*wx.Dialog.__init__(self, *args, **kwds)*
*sizer = wx.BoxSizer(wx.VERTICAL)*
*self.browser = wx.html2.WebView.New(self)*
*sizer.Add(self.browser, 1, wx.EXPAND, 10)*
*self.SetSizer(sizer)*
*self.SetSize((700, 700))*
*
*app = wx.App()*
*dialog = MyBrowser(None, -1)*
*dialog.browser.LoadURL("http://twitter.com")*
*dialog.Show()*
*app.MainLoop()
*
But there is a probrem for me.
This browser shares session information(cookies) with my Safari.
Is there anyway to make it independent from Safari?
You'll probably need to ask about this on the wx-users list.
AFAIK wx uses the native browser as the back-end and you are
actually opening the wx page in a dialogue so will get the default
behaviour - if you are looking for a basic browser functionality
take a look at using wx.HtmlWindow - otherwise you would need to
look at webkit. There may also be a way of starting the default
browser in a private mode.
dialog.Show()
*app.MainLoop()
*
*
*
But there is a probrem for me.
This browser shares session information(cookies) with my Safari.
Is there anyway to make it independent from Safari?
You'll probably need to ask about this on the wx-users list.
*
*
*import wx.html2*
*class MyBrowser(wx.Dialog):*
*def __init__(self, *args, **kwds):*
*wx.Dialog.__init__(self, *args, **kwds)*
*sizer = wx.BoxSizer(wx.VERTICAL)*
*self.browser = wx.html2.WebView.New(self)*
*sizer.Add(self.browser, 1, wx.EXPAND, 10)*
*self.SetSizer(sizer)*
*self.SetSize((700, 700))*
*
*
*app = wx.App()*
*dialog = MyBrowser(None, -1)*
*dialog.browser.LoadURL(["http://twitter.com"](http://twitter.com) )*
*dialog.Show()*
*app.MainLoop()
*
*
*
But there is a probrem for me.
This browser shares session information(cookies) with my Safari.
Is there anyway to make it independent from Safari?
You'll probably need to ask about this on the wx-users list.
AFAIK wx uses the native browser as the back-end and you are
actually opening the wx page in a dialogue so will get the default
behaviour - if you are looking for a basic browser functionality
take a look at using wx.HtmlWindow - otherwise you would need to
look at webkit. There may also be a way of starting the default
browser in a private mode.