I am here with a issue that : I have a GUI (wxpython), it has spinctrl, the output of spinctrl must be sent to c file, which accept command line argument, so whenever i execute c file using subprocess as it accepts value from GUI the spinctrl value must be sent to it instead of manual typing.
My code is:
ps = "password"
var1 = self.sc1.Getvalue()
var2 = self.sc2.Getvalue()
subprocess.call(['echo xsxsxs | sudo "./license.exe"', str(ps), str(var1), str(var2)],shell = True)
whenever i run this script it doesnot show output/error :(
if i remove echo xsxsxs| sudo from the line 4 and then execute then it show error: "you must be root user","Invalid password", "segmentation fault".