Apr-24-2017, 06:57 AM
I think he is doing just that.
Or maybe not. Are you using the print() file argument to redirect the output? Also, print() has a boolean flush argument. I am not really sure what it does.
You can pass the StringIO object to the function and use it as print(text, file=file_obj) argument
Or maybe not. Are you using the print() file argument to redirect the output? Also, print() has a boolean flush argument. I am not really sure what it does.
You can pass the StringIO object to the function and use it as print(text, file=file_obj) argument