get a proxy example code from http://code.activestate.com/recipes/114642/