#NEWLINE# def findSegmentPlace( self , toGo ) : #NEWLINE# #INDENT# index = 1 #NEWLINE# while ( index < len ( self . segments ) ) : #NEWLINE# #INDENT# toGo -= len ( self . segments [ index ] ) #NEWLINE# if ( toGo < 0 ) : #NEWLINE# #INDENT# return ( index , toGo ) #NEWLINE# #UNINDENT# index += 2 #NEWLINE# #UNINDENT# if ( toGo == 0 ) : #NEWLINE# #INDENT# return ( ( index - 2 ) , len ( self . segments [ ( index - 2 ) ] ) )