Python plugin to facilitate programmable in-place document modification