def string2lines(astring, tab_width=8, convert_whitespace=False, whitespace=re.compile('[\x0b\x0c]')):
 if convert_whitespace:
  astring = whitespace.sub(' ', astring)
 return [s.expandtabs(tab_width).rstrip() for s in astring.splitlines()]

def string2lines ( astring , tab_width = 8 , convert_whitespace = False , whitespace = re . compile ( '[\x0b\x0c]' ) ) : if convert_whitespace : astring = whitespace . sub ( ' ' , astring ) return [ s . expandtabs ( tab_width ) . rstrip ( ) for s in astring . splitlines ( ) ]
return a list of one-line strings with tabs expanded .