def createFiles(self, fileContents, path, repMap=None, repMaps=None):
    'repMap: single map for all files\n           repMaps: a dict, with the filenames as the keys'
    if ((repMap is not None) and (repMaps is not None)):
        raise AllInOneError('createFiles can only take repMap or repMaps (or neither), not both')
    result = []
    for fileName in fileContents:
        filePath = os.path.join(path, fileName)
        result.append(filePath)
        for (i, filePathi) in enumerate(addIndex(filePath, self.NJobs)):
            theFile = open(filePathi, 'w')
            fileContentsi = fileContents[fileName]
            if (repMaps is not None):
                repMap = repMaps[fileName]
            if (repMap is not None):
                repMap.update({'nIndex': str(i)})
                fileContentsi = replaceByMap(fileContentsi, repMap)
            theFile.write(fileContentsi)
            theFile.close()
    return result
repMap: single map for all files
repMaps: a dict, with the filenames as the keys
def createFiles(self, fileContents, path, repMap=None, repMaps=None):
    'repMap: single map for all files\n           repMaps: a dict, with the filenames as the keys'
    if ((repMap is not None) and (repMaps is not None)):
        raise AllInOneError('createFiles can only take repMap or repMaps (or neither), not both')
    result = []
    for fileName in fileContents:
        filePath = os.path.join(path, fileName)
        result.append(filePath)
        for (i, filePathi) in enumerate(addIndex(filePath, self.NJobs)):
            theFile = open(filePathi, 'w')
            fileContentsi = fileContents[fileName]
            if (repMaps is not None):
                repMap = repMaps[fileName]
            if (repMap is not None):
                repMap.update({'nIndex': str(i)})
                fileContentsi = replaceByMap(fileContentsi, repMap)
            theFile.write(fileContentsi)
            theFile.close()
    return result