通过python linux运行python脚本

通过python linux运行python脚本,python,tkinter,Python,Tkinter,我想通过GUI执行一个Python文件。所以我用下面这行代码来运行这个脚本。它在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

我想通过GUI执行一个Python文件。所以我用下面这行代码来运行这个脚本。它在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')
但当我在Linux上尝试时,它会显示
run.py:notfound
。我搞不懂这个问题
run.py
与您可以尝试执行的
GUI.py
位于同一目录中

os.system('./run.py')
或者如果那不行的话

os.system('python3 run.py') # or just python for python 2

在Linux下,您不能直接执行
run.py
,除非设置了它的可执行属性,并且在文件的第一行有适当的
shebang
。否则,您需要使用
Python
显式执行脚本。“运行该脚本的下一行”在哪里?