Line number margin

self.__editor.setMarginType(n, QsciScintilla.NumberMargin)

This is the function to set the type of margin n to NumberMargin.

Remember that you can choose the color of margin text (including line numbers) like this: self.__editor.setMarginsForegroundColor(QColor(“#ff0000ff”)).