I am trying to build a program which starts a new command prompt and run a custom command defined by the user. Here is a snippet of my code:
if(fileName == "" or className == ""):
tkMessageBox.showinfo("Error", "Please select a test class/test!")
else:
command = ["start","/w","cmd","/c","ctetest"]
if(verbose.get()):
command.append("-v")
if(xml.get()):
command.append("-x")
if(version.get()):
command.append("-V")
if(output.get()):
command.append("-o")
command.append("RegressionTest/" + folderName)
command.append(fileName + "." + className + "." + methodName)
processOutput = subprocess.check_output(command, shell = True)
print processOutput
I am able to run the command in the new command prompt and then close it when it finishes but the problem is that I am not getting the output from my custom command but instead I am getting the output from the "start" command which is nothing. Is there a way to obtain the output from my custom command? Thanks in advance!