parameters: (sources)
return_statement: return hierarchy
docstring: Break a list of files into a hierarchy; for each value, if it is a string,
         then it is a file.  If it is a dictionary, it is a folder.  The string is
         the original path of the file.
docstring_summary: Break a list of files into a hierarchy; for each value, if it is a string,
         then it is a file.  If it is a dictionary, it is a folder.  The string is
         the original path of the file.
docstring_tokens: Break a list of files into a hierarchy ; for each value if it is a string then it is a file . If it is a dictionary it is a folder . The string is the original path of the file .
function: def makeHierarchy(sources):
      """Break a list of files into a hierarchy; for each value, if it is a string,
         then it is a file.  If it is a dictionary, it is a folder.  The string is
         the original path of the file."""
  
      hierarchy = {}
      for file in sources:
          path = splitFully(file)
          if len(path):
              dict = hierarchy
              for part in path[:-1]:
                  if part not in dict:
                      dict[part] = {}
                  dict = dict[part]
              dict[path[-1]] = file
          #else:
          #    print 'Warning: failed to decompose path for '+str(file)
      return hierarchy
function_tokens: def makeHierarchy ( sources ) : hierarchy = { } for file in sources : path = splitFully ( file ) if len ( path ) : dict = hierarchy for part in path [ : - 1 ] : if part not in dict : dict [ part ] = { } dict = dict [ part ] dict [ path [ - 1 ] ] = file #else: #    print 'Warning: failed to decompose path for '+str(file) return hierarchy