0

Is there a way to redirect the stream to file when creating an instance of class Process or during execution Process(target=..., args=(...)).start()

I asked about the typical pythonic way

Process(target=start_test, args=(timestamp,current_test_suite,user_ip)).start()

If there is no pythonic way to do that maybe linux can redirect PID output to file?

falek.marcin
  • 9,679
  • 9
  • 28
  • 33

1 Answers1

0

If we want to redirect Process output to file we have to assign sys.stdout to open(filename,'w') or open(filename,'a') if we want to appending our log file.

falek.marcin
  • 9,679
  • 9
  • 28
  • 33