I am trying to execute the command below using Popen(shlex.split(cmd)...
and Popen(cmd.split(' ')...
but running into errors below, how else can I run this command or how to debug this error?
def function_create_cmds(cmd):
print cmd
#proc = Popen(shlex.split(cmd), shell=True, stdout=PIPE, stderr=PIPE)
proc = Popen(cmd.split(' '), stdout=PIPE, stderr=PIPE)
(output, error) = proc.communicate()
return output,error
cmd = "/usr/local/bin/xbs submitproject -notesfile /Users/usernamea/autosubmissionlogs/07162018_133945/milestone/project-375/project-375.plist -version project-1.0.7 /Users/usernamea/wifiroots/project Release"
(output,error) = function_create_cmds(cmd)
print output
print error
Error:
Popen(cmd.split(' '),
INFO: submitproject was unable to locate a submission directory named
Popen(shlex.split(cmd)
xbs requires a command