I'm novice in Python scripting. trying to redirect stdout/stderr into file. python script is running on remote machine. doing something like below:
stdin, stdout, stderr = ssh.exec_command(remotePath + proto)
rc = stdout.channel.recv_exit_status()
sys.stdout=open('erroLog', 'w')