Garrett,
Check out this post I did in 2009 on that exact topic:
http://geospatialpython.com/2009/02/zippity-doo-dah.html
One of the links on that post should do what you need. As Dennis
alluded to most people end up using a database of some sort to do this
efficiently as pro grammatically you would have to process all
coordinates. Otherwise you'll end up creating some kind of tiered
database-like structure anyway to not process all of the coordinates.
Let us know if you can't make it work.
- Joel