我写了一个程序,用Python在Ubuntu上打开GUI格式的视频,我不希望命令终端屏幕总是在程序通过Geany编译器执行后才打开。在
你能让我离开这个终端屏幕吗
import Tkinter,ttk
import tkMessageBox
from Tkinter import *
import io,sys,os,subprocess
from tkFileDialog import askopenfilename
def askforvideo():
global process
name= askopenfilename(title=[("videopen")],filetypes=[("Video Files","*.h264")])
if name != "":
subprocess.call(['vlc',name,'--play-and-exit'])
return
root = Tk()
root.title("Flight Recording Application")
mainframe = ttk.Frame(root, padding="200 200 200 200")
mainframe.grid()
ttk.Button(mainframe, text="Video Open", command=askforvideo).grid(column=10, row=3)
ttk.Button(mainframe, text="Exit", command=root.quit).grid(column=95, row=3)
root.mainloop()
以下是可行的。在
单击“编辑”>;“首选项”>;“工具” 在“端子”字段中,将值更改为
这将从bash而不是终端执行python命令。在
如果您使用的是旧版本的Geany,那么更新存储库并使用底部的虚拟终端仿真器可能是值得的。在
相关问题 更多 >
编程相关推荐