Reimplemented COinS generation in Python.

This is for the convenience of Daylight.