Hello , What is the python way of doing this : perl -pi -e 's/string1/string2/' file ? Thanks Olivier