Some changes to work on ActiveState python