Friday, February 08, 2008

Using pygame without a windowing system.

This cookbook entry shows how you can use pygame without a windowing system.

Useful for scripts that run in webservers, or little command line utilities.

Sometimes you just don't need a GUI. Like maybe you want to do some 2d drawing in your opengl application.

The cookbook example is just a thumbnail generation example(using pygames fast mmx assembly using smoothscale function) - but you can do lots of other things with pygame too - like drawing lines - or graphing.

1 comment:

PhilipBober said...

Handy! I tend to use PIL for this sort of thing (server-side image generation), but I always miss having PyGame's simple image manipulation tools. (Blitting in PIL always seems messier and hacky, where as in PyGame it's just easy)

This gives me the best of both worlds! Thanks.