This is an implementation of the minecraft protocol in python. Also packaged is a support for asynchat based servers, clients and proxies, plus some demos.
The demos should be instructive enough. Find me (barneygale) in #mcdevs on freenode if you have any questions.
2015-01-31 update: this software has not been maintained since 2012, and has arguably never been maintained, being more of a dump of code than a real project. Still, it served as a component in early versions of spock.
I'm currently maintaining another protocol library, supporting minecraft versions 1.7 and 1.8: quarry.