Is 'wx.html2.WebView' always shares session with Safari.app?

メニハウ wrote:

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.

···

--
Robin Dunn
Software Craftsman

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.

···

On 20/02/13 03:16, Robin Dunn wrote:

  メニハウ

wrote:

    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()*

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.


Steve Gadget Barnes

“http://twitter.com”

2013年2月20日水曜日 14時55分58秒 UTC+9 Gadget Steve:

···

On 20/02/13 03:16, Robin Dunn wrote:

  メニハウ

wrote:

    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"](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.


Steve Gadget Barnes

Thank you for giving me helpful information!

I’ll try wx.html.HtmlWindow.