redirect python output to input file ubuntu code example Example: redirect python output to file $ python foo.py > file