【发布时间】:2015-04-02 05:56:29
【问题描述】:
我有一个使用 wxpython 创建的 GUI,其中从文件对话框中获取的文件的路径驻留在我命名为 Repofield 的 textctrl 中。
self.Repofield=wx.TextCtrl(panel, pos=(120,25), size=(250,20))
value=self.Repofield.SetValue(dlg.GetPath())
现在我使用子进程将“值”传递给命令:
cmd="./flash -0 -f %s"%(value)
proc=subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, universal_newlines=True)
out,err=proc.communicate()
在 windows 中,我们确实将文件路径写入注册表并在需要时从它(运行时)读取。它在 linux 中是如何工作的?
【问题讨论】:
标签: python-2.7 wxpython