def get_headers(fname, sep, count=60, is_multi_byte=False):
 headers = []
 for (idx, line) in enumerate(open(fname)):
  line = line.rstrip('\n\r')
  if is_multi_byte:
   line = unicodify(line, 'utf-8')
   sep = sep.encode('utf-8')
  headers.append(line.split(sep))
  if (idx == count):
   break
 return headers

def get_headers ( fname , sep , count = 60 , is_multi_byte = False ) : headers = [ ] for ( idx , line ) in enumerate ( open ( fname ) ) : line = line . rstrip ( '\n\r' ) if is_multi_byte : line = unicodify ( line , 'utf-8' ) sep = sep . encode ( 'utf-8' ) headers . append ( line . split ( sep ) ) if ( idx == count ) : break return headers
using session credentials/config .