When we were in Switzerland we spent a bit of time in stores and I spent most of that time studying pendulum clocks whose movement was exposed.
I was delighted to discover an almost identical approach in every single case: a gear train with weights causing torque on the slowest moving gear and a pendulum connected to a piece (a type of what I later found is called an escapement) that regulates the motion of the fastest moving gear. (Wikipedia has a nice diagram showing an escapement in action).
Of course, the devil is in the detail, but the pattern was enough to get me excited about getting deeper into horology.
I've been thinking since about simulating the movement in software. I wonder how easy it would be to build something in ODE, the Open Dynamics Engine, which I know has a Python binding.