advanced linked lists listing continued returns the number of characters in the current line def numcharsself )return lenself _curline text returns the index of the current row (first row has index def lineindexself )return self _currowndx returns the index of the current column (first col has index def columnindexself )return self _curcolndx sets the entry mode based on the boolean value insert def setentrymodeselfinsert )self _insertmode insert toggles the entry mode between insert and overwrite def toggleentrymodeself )self _insertmode not self _insertmode returns true if the current entry mode is insert def ininsertmodeself )return self _insertmode =true returns the character at the current cursor position def getcharself )return self _curline textself _curcolndx returns the current line as string def getlineself )linestr "for char in self _curline text linestr char return linestr moves the cursor up num lines def moveupselfnlines )if nlines < return elif self _curlinendx nlines nlines _curlinendx for in rangenlines self _curline self _curline prev self _curlinendx -nlines if self _curcolndx >self numchars(self movelineend(moves the cursor left one position def moveleftself )if self _curcolndx = if self _currowndx