Looking for pointers/suggestion - how to make a webbrowser with these restriction?

Discussion in 'Python' started by Anthony Kong, Sep 26, 2012.

  1. Anthony Kong

    Anthony Kong Guest

    Hi, all,

    It is kind of a MacGyver question. I am just looking for some general suggestions/pointer.

    First let me first describe the development environment I am in: it is a locked down WinXP PC with limited development tools and libraries. At my disposal I have python 2.6 , webkit 5.33 dll, wx 2.8 and probably a V8 dll. No visual studio or any C/C++ compiler. Do not have admin right.

    So given these existing ingredients, is it possible to build a rudimentary web browser using python as a glue language? What will be the main challenge/bottleneck in this sort of project? In particular how can I hook up V8 and Webkit?

    I have some working experience with Win32 APIs, so you may throw some low level stuff at me if needed. :)

    Cheers
    Anthony Kong, Sep 26, 2012
    #1
    1. Advertising

  2. Re: Looking for pointers/suggestion - how to make a webbrowser withthese restriction?

    On Wed, Sep 26, 2012 at 6:23 PM, Anthony Kong <> wrote:
    > Hi, all,
    >
    > It is kind of a MacGyver question. I am just looking for some general suggestions/pointer.
    >
    > First let me first describe the development environment I am in: it is a locked down WinXP PC with limited development tools and libraries. At my disposal I have python 2.6 , webkit 5.33 dll, wx 2.8 and probably a V8 dll. No visual studio or any C/C++ compiler. Do not have admin right.


    XP shouldn't stop you adding another program, even without admin
    rights. Maybe not a "classic" web browser, but something uber-thin
    like HTMLayout [1], though it's not FOSS (it's free for non-commercial
    use though). It's perhaps too thin for you, but start by loading that
    up and see how it goes.

    > So given these existing ingredients, is it possible to build a rudimentary web browser using python as a glue language? What will be the main challenge/bottleneck in this sort of project? In particular how can I hook up V8and Webkit?
    >
    > I have some working experience with Win32 APIs, so you may throw some lowlevel stuff at me if needed. :)


    Unless someone else has done it already, you're probably going to have
    to do some C++ work to embed V8 inside Python. It's not difficult but
    will need to be done. Webkit is another pile of work. By the time
    you're done, you'll most likely have written a whole web browser
    (minus the decades of experience in performance, security
    vulnerabilities, etc), and it'll probably have problems with your lack
    of admin rights.

    What are your actual requirements? What can't you do? There are some
    really REALLY insane possibilities you could try. Can you install
    PuTTY [2] and Xming [3], and ssh to a Linux box to run a web browser?
    (See, I told you it was insane.)

    ChrisA

    [1] http://www.terrainformatica.com/htmlayout/
    [2] http://www.putty.org/
    [3] http://sourceforge.net/projects/xming/
    Chris Angelico, Sep 26, 2012
    #2
    1. Advertising

  3. Anthony Kong

    Anthony Kong Guest

    Re: Looking for pointers/suggestion - how to make a webbrowser withthese restriction?

    Hi, Chris,

    Thanks for your reply. I really do not have any requirement. It is more a curiosity question (not work related). I'd like to find out how python can be used to 'glue' all these moving parts together. Performance and security are definitely not a concern as it is just a toy idea/project.

    Cheers
    Anthony Kong, Sep 26, 2012
    #3
  4. Anthony Kong

    Anthony Kong Guest

    Re: Looking for pointers/suggestion - how to make a webbrowser withthese restriction?

    Hi, Chris,

    Thanks for your reply. I really do not have any requirement. It is more a curiosity question (not work related). I'd like to find out how python can be used to 'glue' all these moving parts together. Performance and security are definitely not a concern as it is just a toy idea/project.

    Cheers
    Anthony Kong, Sep 26, 2012
    #4
  5. Re: Looking for pointers/suggestion - how to make a webbrowser withthese restriction?

    On Wed, Sep 26, 2012 at 8:41 PM, Anthony Kong <> wrote:
    > Hi, Chris,
    >
    > Thanks for your reply. I really do not have any requirement. It is more acuriosity question (not work related). I'd like to find out how python canbe used to 'glue' all these moving parts together. Performance and security are definitely not a concern as it is just a toy idea/project.


    Okay! Toy project. Here goes then! (BTW, you don't need to send to
    both python-list and comp.lang.python - they mirror each other.)

    1) It's straight-forward to extend Python using C, so you could fairly
    readily make thin wrappers around the C APIs of whatever components
    you want to glue together.

    2) V8 may be a smidge more fiddly, though; it uses a C++ API that's
    designed to be really convenient, using automatic variables and such.
    You may want to consider embedding a different engine, but if you do
    use V8, you'll end up largely undoing all that convenience work
    they've done. A pity really; V8's the first language engine I've ever
    seen that makes it so easy on the embedder.

    3) Networking is easy to do in Python. Obviously you can do TCP
    sockets in pretty much any language, but Python also has handy
    facilities for higher level protocols like HTTP, already built-in. (So
    do quite a few high level languages, these days. It's nothing unique,
    but no less handy.)

    4) Security is going to be a pain. But you said you don't care. Just
    promise me you won't unleash this thing on the world :)

    5) This is going to be a huge job. You're going to get bored of it
    long before it's finished. But it'll still be educative for as long as
    you stick it.

    Have you ever done anything with networking? If not, I'd recommend you
    start there - not because it's the hardest (it isn't), but because
    it's the most fun. At least, *I* think it is. But I'm biased majorly.
    :D

    ChrisA
    Chris Angelico, Sep 26, 2012
    #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. scadav
    Replies:
    2
    Views:
    442
    scadav
    Jul 3, 2004
  2. DirtyClamDigger

    Pointers for these pointers...?

    DirtyClamDigger, Feb 6, 2006, in forum: C++
    Replies:
    2
    Views:
    279
    DirtyClamDigger
    Feb 7, 2006
  3. Junmin H.
    Replies:
    6
    Views:
    321
    Charlie Gordon
    Sep 18, 2007
  4. cerr

    pointers, pointers, pointers...

    cerr, Apr 7, 2011, in forum: C Programming
    Replies:
    12
    Views:
    668
  5. Rudi Cilibrasi
    Replies:
    4
    Views:
    480
    Jorgen Grahn
    Nov 2, 2011
Loading...

Share This Page