I have the following Python code to write dependency files of a project. It works fine with Python 2.x, but while testing it with Python 3 it reports an error.
print() is a function in Python 3.
Change your code to print(s, end="", file=depend), or let the 2to3 tool do it for you.
print(s, end="", file=depend)