partition.py updated to allow format selection