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

Discussion in 'Python' started by lkcl@lkcl.net, Oct 7, 2010.

  1. Guest

    From:
    To:

    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.
     
    , Oct 7, 2010
    #1
    1. Advertising

  2. lkcl Guest

    Re: pywebkit - python bindings for webkit DOM (alpha)

    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.
     
    lkcl, Oct 7, 2010
    #2
    1. Advertising

  3. deostroll Guest

    Re: pywebkit - python bindings for webkit DOM (alpha)

    Hi,

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

    --deostroll
    On Oct 8, 1:57 am, lkcl <> 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.
     
    deostroll, Oct 22, 2010
    #3
  4. deostroll Guest

    Re: pywebkit - python bindings for webkit DOM (alpha)

    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 <> wrote:
    > Hi,
    >
    > Any instructions on how to get started with the source code?
    >
    > --deostroll
    > On Oct 8, 1:57 am, lkcl <> 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.
     
    deostroll, Oct 23, 2010
    #4
  5. notedit

    Joined:
    Nov 12, 2010
    Messages:
    1
    I can not figure out too.

    i compile the pythonwebkit
    but when i "import webkit"
    it tell me there is no webkit.
     
    notedit, Nov 12, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Kenneth Casson Leighton
    Replies:
    0
    Views:
    501
    Luke Kenneth Casson Leighton
    Dec 31, 2008
  2. Luke Kenneth Casson Leighton

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

    Luke Kenneth Casson Leighton, Oct 6, 2010, in forum: Python
    Replies:
    0
    Views:
    389
    Luke Kenneth Casson Leighton
    Oct 6, 2010
  3. Replies:
    0
    Views:
    452
  4. Jorge
    Replies:
    10
    Views:
    401
    Thomas 'PointedEars' Lahn
    Sep 7, 2008
  5. Aaron Gray
    Replies:
    4
    Views:
    172
    Aaron Gray
    Oct 31, 2008
Loading...

Share This Page