2024-05-15 18:08:41 发布
网友
我希望能够从python脚本中运行tcl脚本。具体来说,我希望运行类似于this的tcl脚本。
我对python有一些了解,但对tcl一无所知。
我一直在尝试这样的事情:
import Tkinter r=Tkinter.Tk() r.call('source{DIS.tcl})' or r.tk.eval('source{DIS.tcl})'
有什么想法可以让我访问tcl脚本中的内容吗?谢谢!
Tcl对空白非常敏感(很像Bourne shell)。你可能想要source DIS.tcl而不是source{DIS.tcl}
source DIS.tcl
source{DIS.tcl}
试试这个
import Tkinter r=Tkinter.Tcl() r.eval('source DIS.tcl')
Tcl对空白非常敏感(很像Bourne shell)。你可能想要
source DIS.tcl
而不是source{DIS.tcl}
试试这个
相关问题 更多 >
编程相关推荐