def getTextLines(text):
 if ('\r' in text):
  text = text.replace('\r', '\n').replace('\n\n', '\n')
 textLines = text.split('\n')
 if (len(textLines) == 1):
  if (textLines[0] == ''):
   return []
 return textLines

def getTextLines ( text ) : if ( '\r' in text ) : text = text . replace ( '\r' , '\n' ) . replace ( '\n\n' , '\n' ) textLines = text . split ( '\n' ) if ( len ( textLines ) == 1 ) : if ( textLines [ 0 ] == '' ) : return [ ] return textLines
get the all the lines of text of a text .