是否可以将腻子终端与tkinter gui一起嵌入或连接在一起,使其像一个窗口一样? 供参考,代码的某些部分是;
gui:
self.InWidget = scrolledtext.ScrolledText(self.group1)
打开腻子终端:
app = Application()。start(r“。\ putty.exe -ssh -l” + user +“ -pw” + pswd +“” + ip +“”) 油灰= app.PuTTY
发送命令:
text = self.InWidget.get(line_start,line_end) app = Application()。connect(path ='putty.exe',title =“” + ip +“-PuTTY”)
putty = app.PuTTY
putty.type_keys(“” + text +“”,with_spaces = True)
putty.type_keys('{ENTER}')