shapeToMap.py program has been kept deliberately simple to make it easier to understand, there is a lot that can be done to improve this program and make it more useful. You might like to try challenging yourself by implementing the following new features:
labelHaloentry to each map layer, which is used to draw a halo around the label text.
labelPlacemententry to the map layer, to make it easy to control the label placement options.
labelAllowOverlapentry to the map layer, which controls whether or not the labels are allowed to overlap.
filterentry to the map layer, which is used to build a
mapnik.Filter()expression to limit the set of features displayed within the map layer.