I’m trying to redirect my sys.stdout to a file (i have done this before in other python scripts).
Below my code:
sys.stdout = open("console_log.txt", "w") # <<== Error occurs here ... otehr code ... sys.stdout.close() sys.stdout = sys.__stdout__
The error i am getting is the folowing:
AttributeError: ‘module’ object has no attribute ‘stdout’
However if i check the openMV Doc i find that stdout should exist.
any help would be greatly appreciated