All of the print statements in this function should be removed.  Also it seems like this method should be called `__cmp__()`, see http://docs.python.org/2/reference/datamodel.html#object.__cmp__