distribute.py for partitioning a file into multiple files