I\'m writing a small method to replace some text in a file. The only argument I need is the new text, as it is always the same file and text to be replaced.
I\'m hav
To help you debug it, try adding:
print repr(cmd)
It might be that some special characters slipped into the command that normal print is hiding when you copy and paste it.