Very simple question. I am using the IDLE Python shell to run my Python scripts. I use the following type of structure
import sys
sys.argv = ['','fileinp']
execfile('mypythonscript.py')
Is there a simple way of outputting the results to a file? Something like
execfile('mypythonscript.py') > 'output.dat'
Thanks