Theoretically, you could try something like:
class Out(object):
def write(self, s):
sys.__stdout__.write(s)
open('/tmp/log', 'a').write(s)
sys.stdout = Out()
...
print something
but a cleaner way would be to give up printand just use logging , because that is essentially what you want.