py code for replacing the some shell-command