Publisher review:catenateFilesFactory script generates a catenateFiles function parameterized for common variations. catenateFilesFactory script generates a catenateFiles function parameterized for common variations.
Catenating (or concatenating) files is a common data processing task, but there are at least three independent binary choices for the functional requirements. This could mean 8 different functions, or one functions with three additional boolean arguments.
Binary files are relatively easy to handle. So are text files - unless the last line of a file does not end with a line separator. Then the catenation function must insert a line separator between the last line and the first line of the next file.
An existing target file may or may not be cleared before any of the source files are appended to it.Finally, if the target file does not already exist, it may be created; or it may be required to exist already.The catenateFilesFactory generates and returns a parameterized catentation function each time it is called. Each function has attributes and a doc string describing the parameter values used to generate it. Example:catenateFiles = catenateFilesFactory()srcFiles = ['src1.txt', 'src2.txt', 'src3.txt']catenateFiles(tgtFilename, *srcFiles)catenateBin = catenateFilesFactory(isTextFiles=False, isClearTgt=False, isCreateTgt=False)catenateBin('growing.bin', 'a.bin', 'b.bin')
catenateFilesFactory 1.0 is a Python script for File Management scripts design by Jim Jinkins.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
generates a catenateFiles function parameterized for common variations.
Operating system:Windows / Linux / Mac OS / BSD / Solaris