Python + PyGTK + WebKit in 20 minutes


In season 2 episode 7 of our podcast we laid down the simple challenge for each of the four podcasters - Andrew, Graham, Paul and Mike - to produce something original for the website. Paul - eager to show the world how much he, er, loves Python - has now finished his entry, and you'll find it below: a video talking you through how to get started with Python, PyGTK and WebKit. It's easier than you think!

You should follow us on or Twitter

Your comments

So Simple

This video was really good, I've used pyGTK before but never the webkit module. It looks very versatile and easy to work with!

Great video and really well explained. If i could rate this video it would be 5 stars! :D


Really enjoyed your video, it wakes my programming apetite



Really an excellent presentation!
I can only recommend it!


wow, this screencast is really wonderfull.
I have never seen such an easy introduction into python+gtk.

keep on!


In my few years using Linux I've heard of these technologies but without understanding what they actually do. Although running at a frantic pace, Paul's introduction clearly shows just some of the possibilities open to us.

Once I've gone through my C coding books I at least now have an idea where to go for the next step.

Thanks Paul.

Re: frantic pace

Yes, it was recorded in a single take and in a great rush because I've spent most of today sending the latest issue of LXF off to the printers and still had a few more to go when I was recording this. 20 minutes is quite a short amount of time to cover all the things you do in the video, and in a way the pace of the recording reflects the speed of production with PyGTK - you can get so much done with so little code that my fingers naturally move faster than even I can speak ;)


I actually found I could keep up with this tutorial it was amazing to have a quick introduction to how to work with webkit from within python and GTK.

If this video had been available 18 months ago, my final year uni project would have been so much better :P

really good stuff

thanks for that :)

A good start

Thanks for taking time to put up such a nice tutorial. It sure is a good starting point for anyone to learn PyGtk! And excellent presentation too.

What did you use to create the screencast?

Haven't had a chance to watch the whole thing (pesky work keeps getting in the way), but looks good so far. What program did you use to actually record the screencast?

Love, Light and Peace, Crispibits

Repeat that same "You dare us" challenge

I wish you would repeat that same "You dare us" challenge in every episode and you, Paul, would produce such a video tutorial every two weeks.

I started learning Phyton a while ago but I never really managed to create a real app because I just could not read all those written tutorials. What I would need is probably a mentor I can ask every question I want. Such video tutorials are halfway between reading a tutorial and talking to a person so I'd like to see more (or get you, Paul, to answer all my questions :D )


Great video Paul. I think you should do more of these. Much easier to follow than an article.


Loved it! Have been playing with Python for a while and would have really loved to start with a tutorial like this! A great amount of information ery well explained - others let you read for 3 hours to get the same stuff.

Well Done!

I'm very impressed with this tutorial. It has a good conceptual flow and good productions qualities such as code that is readable and a voice is understandable. It is also my first introduction to a TuxRadar code tutorial.

btw: love the magazine.

Excellent video

Well done. Exactly what I wanted.


Very inspiring! I agree that this is a much easier to follow than a dry article which always looks a bit daunting. This way, especially with python's command interpretor, you can see what's supposed to happen at each step.

Great video, I haven't

Great video, I haven't watched it all yet but I love how you've used the interpreter, really shows off the power of the tools

In my entire Computing A-Level I didn't see as impressive an example as that.


More of these please!

i vote for this one!

Although I haven't seen the video yet, this couldn't possibly be as bad as the other submissions, so I vote for it!

I don't even program and I

I don't even program and I found this video entertaining.

I love it!

I love this and would really like to see more screencasts like this! Great content, great format.


Your video is awesome, I love it. You made python really simple.

liked it but foggy...

great video.. why don't you put the super high res too?
kind of foggy when I played it full screen...
[by the way I tried both mov and ogv]


Too good Paul. Adding my thanks. Consider doing a series. You'll be famous/er.

Crashing on Ubuntu 9.10 and 10.04

Python 2.6.4 on Ubuntu 9.10 32-bit crashes on the "browser = webkit.WebView()" line with error:

GLib-ERROR **: The thread system is not yet initialized.


Python 2.6.5 on Ubuntu 10.04 32-bit crashes on the same line with endless output saying "error: line XXX: bad flag vector alias" and "bad flag alias index: 0"


Progress Bar in Ubuntu 9.10

The method name for showing and hiding the progress bar in Ubuntu 9.10 (with whichever version of webkit it has) is:


and not


(I've not used GTK/webkit until viewing this video, so I'm not an expert. The "child_visible" method worked, so I'm presuming that's what should be used. However, the space occupied by the progress bar remains at the bottom of the window. In the video, when the progress bar is removed, the browser space increases; on mine, the space for the bar is always allocated below the scrollbar.)

Is the code used there published anywhere

Awesome video tutorial at a breakneck pace, as many have already said. Full points from me !

How about making the code used in the tutorial available for download?

Really enjoyed the video!

Really enjoyed the video! Great stuff, have always wanted to get back into programming, and it's great to see it actually occuring in action. Can we have some more please? And would this also work on my N900 running maemo 5?



Oh, very nice!

Terrifically exciting! Just the sort of thing I needed, really. If only I didn't need so many dependencies!

Really wonderful! I like how

Really wonderful!
I like how quick you talk and show how it works!

I don't want to wait longer ;)

how can i keep it?????

how can I keep the browser or use it???? there's any way to save it? when I exit from Python I have to restart everything or there is a way to open it???

Thank for the tutorial

Brilliant, simply brilliant.

Thanks for the wonderful tut.


Thank You for a Wonderfull Tutorial!

Awesome Tut

Thanks so much for the tutorial. Great intro to pygtk and webkit. I programmed with Qt recently (with C++) and loved it. Gtk seems to be just as easy to use and this level of interactivity makes it much easier for a developer for visualize an app while programming. Awesome stuff and thanks again.

videos no longer available?

I'm not getting the video from either of the links above. I get a 404 - Not Found response.

Please advise!

video links are broken

I also can not access either video. Please repost these videos. thanks...

anyone here to response the comments?

come on.. the video was gone!

Missing video

Any chance of getting this video restored? Thanks.

well done

Great video... Never used Python, gtk or webkit and it gave me a very good overview!
I python interpreter is great to teach programming. very exciting.
This is great. I hope you would do more of these!

Awesome tutorial

Excellent tutorial my friend. I'm astonished that you did not get a single syntax error. I bow to your superior typing/programming skills.


Would you please type a location to find some kind of docs about webkit with gtk ? Webkit under pyqt is so much easier to work with because pyqt or more specifiaclly Qt4 has excellent documentation. I find the C++ documentation for qt4 is all I need to find classes and functions to use with PyQt.


This is very useful video for beginner who are very much interested in pygtk and webkit.


Very VERY well done tutorial, we would love to see more of that, in a series maybe?

Windows Webkit

gnome is somewhat of a PAIN in windows however python qt is a much more straightforward proposition. google pyqt which will show RiverBank.
Download a binary pyqt package preferabaly a python 2.7 or something, download the coresponding python package, and you are good to go. qt and pyqt will include webkit, plus the documentation for qt is better than for gnome.

This has been ever so

This has been ever so useful. Thank you!

i need some advice for

i need some advice for it good for making online games???

¡Muchas gracias!

Muchas gracias por el vídeo!
me ha sido de gran ayuda!

i am not able to download

i am not able to download the videos of the tutorials.
Please fix it.

great video

nice video, loved the explanation. Inspired to explore webkit further :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Username:   Password: