achorrath233 last edited by
I was trying out an example from the Python 2.7 documentation. It used sys.stdout.writelines(). This method failed with the following exception:
'StdoutCatcher' object has no attribute 'writelines'
What is StdoutCatcher?
omz last edited by
Thanks for noticing, this is a bug. <code>StdoutCatcher</code> is a class that is used internally to redirect output to the console UI in Pythonista. You normally don't have to worry about it.
The bug will be fixed in the next update. For now, you could replace the use of writelines in the sample code with something like this:
<pre>for line in lines:
sys.stdout.write(line + '\n')</pre>