portable version in python