Is there a way in Powershell to redirect the print statements from python one place and the return statements to another place?
For instance i'm trying
$ python myPythonScript.py args >> logFile
I get print statement output in my log file (though it looks awful, cleaning will be the next job)
However, i do not get the return statement values from the python in the output. Nor do i catch them if I use *>>
Any ideas what's happening?
Python Example:
def main(args)
print "This goes to file"
#parse flags...
#do something here...
MyVar = "Please " + "Work"
return MyVar #doesn't go anywhere
if(__name__ == '__main__':
main(sys.argv)