PythonDbg.log is where the output from any print statements in the Python files goes. If you add statements like print("iX, iY = %d, %d" % (iX,iY)) in your code then this is where you look to find out what the output was. This is good for seeing what is really going on: are the variables being set to what you think they should be, and stuff like that.
PythonErr.log is where the text for Python exceptions ends up. The text that ends up in here is the same text that shows up in the Python exception pop-ups if those are enabled, but generally formatted better. (There is also a PythonErr2.log, but that generally only holds some startup load messages, much like at the beginning of the PythonDbg.log file and is not very useful most of the time.)
By the way, the "print" statement is one of the most unusual statements in Python. You can use it with or without parenthesis (i.e. "print(x)" or "print x") and in the version without them (and maybe the one with, I don't remember) it will print things separated by commas in the order given ("print iX, iY"). You can also specify a formatting string which takes a tuple of arguments given after a % sign like: print(" iX = %d, iY = %d, text = %s" % (iX, iY, szText)), which can also be done without the parenthesis. If you don't use the version that specifies formatting it uses the representation of the variable that you get by converting it to a text string as per the str(x) function. Just so you know...