Hello, 

I would like to port a screenshot utility program from C to Python.
So I started to experiment with Python + Xlib. The original code... is written in C and Xlib + GTK/GDK libraries. 

A simple start.
My first test code should draw a line on the root window (on the desktop surface), but it does not work. 

Can you help me.

The code is here:
http://www.futuredesktop.com/dev/test1.py

See also this  message on the Ubuntuforums.org
http://ubuntuforums.org/showthread.php?t=1398201

Most kindly
  Moma Antero