I have a simple cronjob running every day at 18:35:
05 18 * * * ~/job.sh 2>&1 >> ~/job.log
So the output of ~/job.sh should be
I'm quite sure that this should work in a general case. The stdout file descriptor is changed by the OS when you use shell redirection.
However, if your Python script itself directly writes to the screen (perhaps by opening /dev/tty), it won't get captured in your log.txt. Is that the case? Does it fail even for a simple python program that just does a
print "Hello"
?