Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [ANN] pywebkit - python bindings for webkit DOM (alpha)

Reply
Thread Tools

[ANN] pywebkit - python bindings for webkit DOM (alpha)

 
 
lkcl@lkcl.net
Guest
Posts: n/a
 
      10-06-2010
From:
To: python-

i've been kindly sponsored by http://www.samurai.com.br to create
direct python bindings to webkit's DOM:
http://www.gnu.org/software/pythonwebkit/

the significance of this project is that it makes python a peer of
javascript when it comes to manipulating HTML through DOM functions
(including gaining access to the full features of HTML5 for example).
anything that can be done with javascript (such as
getElementsByTagName, appendChild etc.) can be done with python, in a
declarative programming style (not as < script language="python" >).
that means that the powerful features of HTML5 that were formerly
pretty much exclusively available to javascript programmers are now
equally available to python programmers, and webkit is known as being
especially suited to embedded environments.

anyone who has been following pywebkitgtk or pyjamas development will
be aware that the previous python webkit DOM bindings, written in
2008, were based on top of glib/gobject bindings and used
python-gobject to autogenerate them. whilst this approach worked, its
future was made slightly awkward when the development of the gobject
bindings were kindly taken over by free software developers who have
been working hard to incorporate the full features of the original
gobject bindings into webkit for almost a year, now. the pythonwebkit
project therefore begins again, with *direct* access to webkit DOM
functions and properties instead of going via an intermediate layer
such as gobject.

the source code for the pywebkitgtk project has been directly
incorporated into the pythonwebkit project, making it a much simpler
prospect to build. that does not mean that it's easy - just easier!
for build instructions, please read the instructions at
http://www.gnu.org/software/pythonwebkit/ which recommend reading of
the original webkit build instructions on the original webkit
developer web site, with specific advice on the additional python
requirements. (please note that the ongoing development focus is on
linux and embedded linux systems: windows and macosx developers are
very much "on their own" as far as build procedures are concerned, but
macosx developers are best advised to start from darwinports and to go
from there. windows developers: good luck. send us a postcard from
whatever loony bin you end up in, if they allow you access to
crayons).

for those people interested in pyjamas (http://pyjs.org), pyjamas
desktop has already been updated accordingly, and is already useable
with pywebkit.

please note that this is a very early announcement, with quite a lot
still left to do, but whilst there are known issues, the project is
definitely at the "working" state and so is worthy of an announcement
if anyone is interested in testing and contributing or just seeing
what the fuss is about.

l.

p.s. it's worthwhile pointing out, for anyone who is interested, that
if you wish to access a browser engine's DOM model on windows, it is
much easier to use python-COM bindings to MSHTML than it is to try
building webkit with python bindings on windows - but should you ever
succeed in building pythonwebkit on windows, please do get in touch.
if however you See The Light and realise in good time that it's a
train coming straight at you, and decide to use python COM instead, i
recommend looking at pyjd/mshtml.py and associated code in the pyjamas
project - http://pyjs.org - and beginning from there. compiling
webkit (and xulrunner) on windows really is that bad, and
incorporating python into the mix really is likely to push your sanity
off the edge of a cliff. if you succeed however, there are quite a
lot of people who will be extremely grateful for your sacrifice, and
who will come visit you and bring you flowers and children's colouring
picture books on a regular basis.
 
Reply With Quote
 
 
 
 
lkcl
Guest
Posts: n/a
 
      10-07-2010
apologies for the 3 copies of the post: mail.python.org's SMTP service
was offline yesterday.

just a quick update: XMLHttpRequest support has been fixed today, and
the correct version of libsoup discovered which actually works. that
puts PythonWebkit into a "useful and useable" state, despite being
only 15 days old. further development is still needed, but it's still
pretty exciting to be back to where the original python webkit
bindings code was, from 2008, minus the cruft from the intermediate
glib/gobject layer, in such a short amount of time.

l.
 
Reply With Quote
 
 
 
 
deostroll
Guest
Posts: n/a
 
      10-22-2010
Hi,

Any instructions on how to get started with the source code?

--deostroll
On Oct 8, 1:57*am, lkcl <luke.leigh...@gmail.com> wrote:
> apologies for the 3 copies of the post: mail.python.org's SMTP service
> was offline yesterday.
>
> just a quick update: XMLHttpRequest support has been fixed today, and
> the correct version of libsoup discovered which actually works. *that
> puts PythonWebkit into a "useful and useable" state, despite being
> only 15 days old. *further development is still needed, but it's still
> pretty exciting to be back to where the original python webkit
> bindings code was, from 2008, minus the cruft from the intermediate
> glib/gobject layer, in such a short amount of time.
>
> l.


 
Reply With Quote
 
deostroll
Guest
Posts: n/a
 
      10-23-2010
Okay found the instruction to build the project on the site
http://www.gnu.org/software/pythonwebkit/

Not sure how to apply the patch. I already have an installation of
pythonwebkit. Should I uninstall it, download the source from
http://code.google.com/p/pywebkitgtk and then apply the patch.

I've tried applying the patch when python webkit was installed itself.
I don't think I could get the get_dom_document() on the WebFrame.

--deostroll

On Oct 22, 8:39*pm, deostroll <deostr...@gmail.com> wrote:
> Hi,
>
> Any instructions on how to get started with the source code?
>
> --deostroll
> On Oct 8, 1:57*am, lkcl <luke.leigh...@gmail.com> wrote:
>
> > apologies for the 3 copies of the post: mail.python.org's SMTP service
> > was offline yesterday.

>
> > just a quick update: XMLHttpRequest support has been fixed today, and
> > the correct version of libsoup discovered which actually works. *that
> > puts PythonWebkit into a "useful and useable" state, despite being
> > only 15 days old. *further development is still needed, but it's still
> > pretty exciting to be back to where the original python webkit
> > bindings code was, from 2008, minus the cruft from the intermediate
> > glib/gobject layer, in such a short amount of time.

>
> > l.


 
Reply With Quote
 
notedit notedit is offline
Junior Member
Join Date: Nov 2010
Posts: 1
 
      11-12-2010
I can not figure out too.

i compile the pythonwebkit
but when i "import webkit"
it tell me there is no webkit.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] pywebkit - python bindings for webkit DOM (alpha) lkcl@lkcl.net Python 0 10-06-2010 11:14 PM
[ANN] pywebkit - python bindings for webkit DOM (alpha) Luke Kenneth Casson Leighton Python 0 10-06-2010 09:59 PM
input checkbox onclick not working via DOM on IE7, FF, WebKit Aaron Gray Javascript 4 10-31-2008 03:45 PM
need help regarding webkit application. Mital C++ 0 10-26-2008 12:41 PM
Webkit/V8 vs. Webkit/JavaScriptCore/SquirreFish, WOW Jorge Javascript 10 09-07-2008 10:06 PM



Advertisments