This Python package draws vernier scales, as found on callipers. You can find more information about vernier scales behind the following link: http://en.wikipedia.org/wiki/Vernier_scale
Have a look at the examples in the 'examples' directory, they should be fairly easy to understand.
I wrote this package so I could use a vernier scale on my center of gravity gauge, to increase the resolution of the readout a bit.
On OSX, I use bre to install the cairo dependency.
$> brew install py2cairo