Python rewrite of INVedit