curves with python