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

A

Anthony Kong

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
 
C

Chris Angelico

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/
 
A

Anthony Kong

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
 
A

Anthony Kong

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
 
C

Chris Angelico

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top