rewrite scripts in crc-test using python