I wanted to execute a Python file via GUI. So I'm using following line to run that script. It's working fine on Windows.
GButton_330=tk.Button(root)
GButton_330["bg"] = "#efefef"
ft = tkFont.Font(family='Times',size=10)
GButton_330["font"] = ft
GButton_330["fg"] = "#000000"
GButton_330["justify"] = "center"
GButton_330["text"] = "Start"
GButton_330.place(x=340,y=170,width=70,height=25)
GButton_330["command"] = lambda: os.system('run.py')
But when I'm trying on Linux it says run.py: not found. I can't figure out the issue. run.py is in the same directory as GUI.py.
run.pydirectly except its executable attributes are set and has propershebangat the first line of the file. Otherwise you need to usePythonto execute the script explicitly.