how to redirect one output of python file to another python file code example Example: redirect python output to file $ python foo.py > file