Re: [wxPython-users] Can't change webview backend ?

334 views
Skip to first unread message

Robin Dunn

unread,
Feb 27, 2013, 9:06:17 PM2/27/13
to wxpytho...@googlegroups.com
Shoom wrote:
> original code:
>
> self.html = wx.html2.WebView.New(id=wxID_FRAME1HTML, name=u'html',
> parent=self, pos=wx.Point(368, 216), size=wx.Size(224, 320),
> style=wx.html.HW_SCROLLBAR_AUTO)
>
> The backend now is Explorer (probably windows' default - i'm on windows 7)
>
> I tried the following argument options::
> backend="WebViewBackendWebKit"
> backend=WebViewBackendWebKit
> backend=wx.html2.WebViewBackendWebKit
>
> But none works.
> I search the whole python directory, and the word "WebViewBackendWebKit"
> doesn't exist anywhere.
> According to the documentation, there should be a "backend" argument,
> and it should be a string. The error below expects type
> 'wxWebViewBackend' - which i don't know how to produce.

The change to using a string to specify the backend happened just a few
weeks ago, before that it was using an enum named... you guessed it:
wxWebViewBackend. The enum values were

>>> for d in dir(wx.html2):
... if 'backend' in d.lower():
... print d
...
WEB_VIEW_BACKEND_DEFAULT
WEB_VIEW_BACKEND_IE
WEB_VIEW_BACKEND_WEBKIT
>>>

However the only backend available for Windows is the IE backend. The
architecture is designed to allow others, but none have been written and
added to wxWidgets yet. I think I read something about a webkit plugin
for Windows being worked on, but so far it hasn't been incorporated into
wxWidgets.

--
Robin Dunn
Software Craftsman
http://wxPython.org

Shoom

unread,
Feb 28, 2013, 1:43:17 PM2/28/13
to wxpytho...@googlegroups.com
On Thursday, February 28, 2013 4:06:17 AM UTC+2, Robin Dunn wrote:
Shoom wrote:
> original code:
>
> self.html = wx.html2.WebView.New(id=wxID_FRAME1HTML, name=u'html',
> parent=self, pos=wx.Point(368, 216), size=wx.Size(224, 320),
> style=wx.html.HW_SCROLLBAR_AUTO)
>
> The backend now is Explorer (probably windows' default - i'm on windows 7)
>
> I tried the following argument options::
> backend="WebViewBackendWebKit"
> backend=WebViewBackendWebKit
> backend=wx.html2.WebViewBackendWebKit
>

The change to using a string to specify the backend happened just a few
weeks ago, before that it was using an enum named... you guessed it:
wxWebViewBackend.  The enum values were

  WEB_VIEW_BACKEND_DEFAULT
  WEB_VIEW_BACKEND_IE
  WEB_VIEW_BACKEND_WEBKIT
  >>>

However the only backend available for Windows is the IE backend.  The
architecture is designed to allow others, but none have been written and
added to wxWidgets yet.  I think I read something about a webkit plugin
for Windows being worked on, but so far it hasn't been incorporated into
wxWidgets.
 

So I was too optimistic :)
I'll either wait or try wxwebconnect then...
Thank you

Chris Barker - NOAA Federal

unread,
Feb 28, 2013, 2:37:06 PM2/28/13
to wxpytho...@googlegroups.com
> On Thursday, February 28, 2013 4:06:17 AM UTC+2, Robin Dunn wrote:

>> However the only backend available for Windows is the IE backend. The
>> architecture is designed to allow others, but none have been written and
>> added to wxWidgets yet.

CEF (Embedded Chrome )could be a nice option:

http://code.google.com/p/chromiumembedded/

There are Python bindings already, though not sure they'd help here:

http://code.google.com/p/cefpython/

oh -- they might, they have a sample of embedding CEF in wxPython!

-Chris




--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris....@noaa.gov
Reply all
Reply to author
Forward
0 new messages