From http://stackoverflow.com/questions/1096216/override-namespace-in-python/1096247#1096247