[Tutor] python / gtk / Webkit app wrapper.
Darin Lawson Hosking
darinlh at gmail.com
Thu Jun 27 23:57:36 CEST 2013
Greetings all,
Was wondering if one of you fine python wizards could help me with trying
to fix a python / gtk / Webkit app wrapper.
Here is a simple version of what I am trying to do.
http://pastebin.com/2zi0SgfT
The HUGE hurdle I am having is activating the Webkit spell checker for
forms.
from gtkspellcheck import SpellChecker
window = gtk.Window(gtk.WindowType(0))
view = gtk.TextView()
spellchecker = SpellChecker(view)
works fine for a text / editor type window but
win = gtk.Window(gtk.WindowType(0))
web = webkit.WebView()
spellchecker = SpellChecker(web)
returns
Traceback (most recent call last):
File "main_wrapper.py", line 24, in <module>
spellchecker = SpellChecker(web)
File "/usr/local/lib/python2.7/dist-packages/gtkspellcheck/spellcheck.py",
line 222, in __init__
self.buffer_initialize()
File "/usr/local/lib/python2.7/dist-packages/gtkspellcheck/spellcheck.py",
line 258, in buffer_initialize
self._buffer = self._view.get_buffer()
AttributeError: 'webkit.WebView' object has no attribute 'get_buffer'
I also tried this and it appears to run ie no errors BUT does not highlight
misspellings?
settings = webkit.WebSettings()
settings.set_property('enable-spell-checking', True)
Any help would be greatly appreciated
Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130627/6c866311/attachment.html>
More information about the Tutor
mailing list