python script for postreg