def loadarff(f):
 if hasattr(f, 'read'):
  ofile = f
 else:
  ofile = open(f, 'rt')
 try:
  return _loadarff(ofile)
 finally:
  if (ofile is not f):
   ofile.close()

def loadarff ( f ) : if hasattr ( f , 'read' ) : ofile = f else : ofile = open ( f , 'rt' ) try : return _loadarff ( ofile ) finally : if ( ofile is not f ) : ofile . close ( )
read an arff file .