python scripts for pre-process and post-process