def loadLocalVariables(filename):
 with open(filename, 'r') as f:
  lines = [f.readline(), f.readline()]
 for line in lines:
  try:
   return _parseLocalVariables(line)
  except ValueError:
   pass
 return {}

def loadLocalVariables ( filename ) : with open ( filename , 'r' ) as f : lines = [ f . readline ( ) , f . readline ( ) ] for line in lines : try : return _parseLocalVariables ( line ) except ValueError : pass return { }
accepts a filename and attempts to load the emacs variable declarations from that file .