python - Error when calling Executable from Tkinter -
i have executable named learn after compiling program vv.c in linux.i using tkinter (python-tk) making gui.but when running executable code.it reached error message "sh :1 : learn :not found " -t -c -b parametes passing executable.
else: if self.binaryfeature == 0: cmd = "learn" + "-t " + self.type + " -c "\ + self.c + " " + self.e2.get() + " " + self.e3.get() else: cmd = "learn" + "-t " + self.type + " -c "\ + self.c + " -b 1 " + self.e2.get()\ + " " + self.e3.get() output_string = commands.getoutput(cmd) self.text.insert(insert, output_string+"\n","cprogramoutput") is error in commands executing ?please me ..thanks
you need put space before "-t":
cmd = "learn" + " -t " + self.type + " -c "\ + self.c + " " + self.e2.get() + " " + self.e3.get() currently shell evaluates command learn-t rather learn -t.
Comments
Post a Comment