Using pygame without a windowing system.

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

http://pygame.org/wiki/HeadlessNoWindowsNeeded


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.




Comments

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.

Popular posts from this blog

Draft 3 of, ^Let's write a unit test!^

Is PostgreSQL good enough?

post modern C tooling - draft 6