Through python script, I am trying to replace a string by a string in a file using
sed command. I do that through
subprocess.call as it in the script.
When I run the command in the shell script or command, it runs fine, but in python I get a result saying "No input file". Any idea how to fix that error?
#!/usr/bin/python import subprocess subprocess.call(["sed -i -e 's/hello/helloworld/g'","www.txt"], shell=True)
No input file