Automating curve through python

I am trying to automate the curve through xyz points of multiple files through macro and python. I keep facing an error with  'bool' object not callable. What can i do?