How to know the file location of a pprint and print statement?

You can make your function for print, or replace global print function