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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -