Is it possible to redirect python output to web using a redirect command? I know that we can redirect the output as follows
import sys
sys.stdout = open('file', 'w')
print 'test'
or
In a terminal like this
$ python foo.py > file
I heard that a web framework 'Django' and 'Flask'can do the trick. I wonder if using a simple command, for example, sys.stdoutredirect output to the web?
source
share