I\'m executing a .py file, which spits out a give string. This command works fine
execfile (\'file.py\')
But I want the output (in addition to it being shown
If you are running the file on Windows command prompt:
python filename.py >> textfile.txt
The output would be redirected to the textfile.txt in the same folder where the filename.py file is stored.
The above is only if you have the results showing on cmd and you want to see the entire result without it being truncated.