(path)
return substructures
Returns a list of subpaths, each representing substructures the glyph.
Returns a list of subpaths, each representing substructures the glyph.
Returns a list of subpaths each representing substructures the glyph .
def _separate_substructures(path):
  """Returns a list of subpaths, each representing substructures the glyph."""
  substructures = []
  curr = []
  for cmd in path:
    if cmd[0] in 'mM' and curr:
      substructures.append(curr)
      curr = []
    curr.append(cmd)
  if curr:
    substructures.append(curr)
  return substructures
def _separate_substructures ( path ) : substructures = [ ] curr = [ ] for cmd in path : if cmd [ 0 ] in 'mM' and curr : substructures . append ( curr ) curr = [ ] curr . append ( cmd ) if curr : substructures . append ( curr ) return substructures