#NEWLINE# def lines( self , data = None ) : #NEWLINE# #INDENT# ' Takes a list of line numbers (zero based), \n            regions, or else uses the selection.\n            Returns regions, each covering one complete line, \n            representing the lines included in the supplied input.\n        ' #NEWLINE# lines = [ ] #NEWLINE# if ( data is None ) : #NEWLINE# #INDENT# regions = self . view . sel ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( data ) != list ) : #NEWLINE# #INDENT# data = [ data ] #NEWLINE# #UNINDENT# regions = [ ] #NEWLINE# for item in data : #NEWLINE# #INDENT# if ( ( type ( item ) == int ) or item . isdigit ( ) ) : #NEWLINE# #INDENT# regions . append ( self . view . line ( self . view . text_point ( int ( item ) , 0 ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# regions . append ( item ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for i in range ( len ( regions ) ) : #NEWLINE# #INDENT# lines . extend ( self . view . split_by_newlines ( regions [ i ] ) ) #NEWLINE# #UNINDENT# return [ self . view . line ( line ) for line in lines ]