def gpa_iterator(handle):
 inline = handle.readline()
 if (inline.strip() == '!gpa-version: 1.1'):
  return _gpa11iterator(handle)
 elif (inline.strip() == '!gpa-version: 1.0'):
  return _gpa10iterator(handle)
 else:
  raise ValueError('Unknown GPA version {0}\n'.format(inline))

def gpa_iterator ( handle ) : inline = handle . readline ( ) if ( inline . strip ( ) == '!gpa-version: 1.1' ) : return _gpa11iterator ( handle ) elif ( inline . strip ( ) == '!gpa-version: 1.0' ) : return _gpa10iterator ( handle ) else : raise ValueError ( 'Unknown GPA version {0}\n' . format ( inline ) )
wrapper function: read gpa format files .