Can't change webview backend ?

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

So I was too optimistic :slight_smile:
I’ll either wait or try wxwebconnect then…
Thank you

···

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.

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:

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

-Chris

···

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.

--

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.Barker@noaa.gov