I am trying to write this script to my linux terminal and I am recieving the following error message: "OSError: [Errno 2] No such file or directory". Can anyone help, Thanks
#!/home/build/test/Python-2.6.4
import os, subprocess
# Create a long command line
cmd =[\
"si createsandbox --yes --hostname=be", \
" --port=70", \
" --user=gh", \
" --password=34", \
" --populate --project=e:/project.pj", \
" --lineTerminator=lf new_sandbox"\
]
outFile = os.path.join(os.curdir, "output.log")
outptr = file(outFile, "w")
errFile = os.path.join(os.curdir, "error.log")
errptr = file(errFile, "w")
retval = subprocess.call(cmd, 0, None, None, outptr, errptr)
errptr.close()
outptr.close()
if not retval == 0:
errptr = file(errFile, "r")
errData = errptr.read()
errptr.close()
raise Exception("Error executing command: " + repr(errData))