You will need to understand the math for formulating the problem, the link offered by William is good place to experiment with the code. If you want to follow the math there are a few good places to check:
http://home.hit.no/~hansha/documents/control/theory/kalmanfilter.pdf
http://www.cl.cam.ac.uk/~rmf25/papers/Understanding%20the%20Basis%20of%20the%20Kalman%20Filter.pdf
http://old.shahed.ac.ir/references/kalman_filter_notes.pdf
and ofcourse
http://en.wikipedia.org/wiki/Kalman_filter
has some excellent references to go through. Also...
Check out the Udacity course:
https://www.udacity.com/course/cs373
This has a section on Kalman filters programming using python.