python script - constraints