'Pyton2.7 GTK webkit enable hardware acceleration

I'm working on some python2.7 widgets for a Digital signage using GTK and webkit and I was wondering How can I enable 2d hardware acceleration? I'm running Raspbian OS.

import gtk
import webkit
import time 

view = webkit.WebView()

sw = gtk.ScrolledWindow()

sw.add(view)

time.sleep(4)

win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.set_default_size(400, 896)

win.set_decorated(0)

win.add(sw)
win.move(1920, 72)

win.show_all()


view.open("http://yahoo.com")
gtk.main()


Solution 1:[1]

Python 3.7 webkit2 was the solution, It looks like the WebKit API for python 2.7 is obsolete.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 robotron