Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用于在用户选择的文件上运行shell脚本的Python GUI_Python_User Interface - Fatal编程技术网

用于在用户选择的文件上运行shell脚本的Python GUI

用于在用户选择的文件上运行shell脚本的Python GUI,python,user-interface,Python,User Interface,我需要在python中创建一个gui,gui中有一个浏览按钮,我需要在这些浏览的文件上运行特定的shell脚本。有人能帮我吗 import wx,os a = wx.App() d = wx.FileDialog(None,"Select A Script",wildcard="*.py") d.ShowModal() os.system(d.GetPath()) 4行实际代码。。。你可以很容易地在谷歌上搜索这个…你能给我们展示一下你为实现这个结果而尝试的任何东西吗?StackOverflow

我需要在python中创建一个gui,gui中有一个浏览按钮,我需要在这些浏览的文件上运行特定的shell脚本。有人能帮我吗

import wx,os
a = wx.App()
d = wx.FileDialog(None,"Select A Script",wildcard="*.py")
d.ShowModal()
os.system(d.GetPath())

4行实际代码。。。你可以很容易地在谷歌上搜索这个…

你能给我们展示一下你为实现这个结果而尝试的任何东西吗?StackOverflow不是一个代码编写服务。使用Tkinter和。我想我在网上的某个地方见过类似的东西,好好看看,试试看,我们不会为你写的。如果不缩小你的问题范围,我觉得这太宽泛了。如果你把问题集中在这个任务中你遇到困难的那部分,那么你可能会过得更好。。。我只是想知道如何显示特定脚本的输出。我正在用户选择的文件上运行脚本,这反过来又会生成另一个文件。非常感谢。但实际上,我已经开始在gui中使用tkinter模块。还有一件事是,用户必须选择shell脚本必须运行的文件。输出应显示在新窗口上。