triple double-quoted docstring

and do not use builtin names for variables
This commit is contained in:
thorade
2017-11-27 15:10:56 +01:00
committed by Thomas Krijnen
parent fd821d08cd
commit 20cd383504
@@ -32,19 +32,19 @@ except BaseException:
class StdoutRedirector(object):
'''A class for redirecting stdout to this Text widget.'''
"""A class for redirecting stdout to this Text widget."""
def __init__(self, widget):
self.widget = widget
self.isError = False
def write(self, str):
def write(self, myStr):
self.widget.moveCursor(QtGui.QTextCursor.End)
if self.isError:
self.widget.setTextColor(QtCore.Qt.red)
else:
self.widget.setTextColor(QtCore.Qt.white)
self.widget.insertPlainText(str)
self.widget.insertPlainText(myStr)
self.widget.moveCursor(QtGui.QTextCursor.End)