update template-expand-template key binding for python and shell script