python 3.x fix for linux and mac.