I have the following static method in Python.
import subprocess
class ProcessUtility:
@staticmethod
def execute_command(url):
process = None
process = subprocess.check_output(["phantomas " + url + " --har=test.har"])
return process
It command basically writes the output to test.har file. I have created the test.har file in the same directory as that of the script and given it read,write and execute permissions.
Upon executing I get the error.
OSError: [Errno 2] No such file or directory
Any ideas why I keep getting this.
subprocerss.check_output(). It's been so long since I've had to check the docs forsubprocessthat I'd never noticed the new addition for 2.7.