def _parse_composites(fh):
 d = {}
 while 1:
  line = fh.readline()
  if (not line):
   break
  line = line.rstrip()
  if (len(line) == 0):
   continue
  if line.startswith('EndComposites'):
   return d
  vals = line.split(';')
  cc = vals[0].split()
  (name, numParts) = (cc[1], _to_int(cc[2]))
  pccParts = []
  for s in vals[1:(-1)]:
   pcc = s.split()
   (name, dx, dy) = (pcc[1], _to_float(pcc[2]), _to_float(pcc[3]))
   pccParts.append((name, dx, dy))
  d[name] = pccParts
 raise RuntimeError('Bad composites parse')

def _parse_composites ( fh ) : d = { } while 1 : line = fh . readline ( ) if ( not line ) : break line = line . rstrip ( ) if ( len ( line ) == 0 ) : continue if line . startswith ( 'EndComposites' ) : return d vals = line . split ( ';' ) cc = vals [ 0 ] . split ( ) ( name , numParts ) = ( cc [ 1 ] , _to_int ( cc [ 2 ] ) ) pccParts = [ ] for s in vals [ 1 : ( - 1 ) ] : pcc = s . split ( ) ( name , dx , dy ) = ( pcc [ 1 ] , _to_float ( pcc [ 2 ] ) , _to_float ( pcc [ 3 ] ) ) pccParts . append ( ( name , dx , dy ) ) d [ name ] = pccParts raise RuntimeError ( 'Bad composites parse' )
return a composites dictionary .