我无法获取从终端到tkinter标签小部件的输出。有人能帮我吗
班级安排管理:
def __init__(self, masterwindow, title, size):
self.masterwindow = masterwindow
self.button_showobj = Button(self.frame1, text=' Show Object ', fg='black', bg='light yellow',
command=lambda: self.callback1(),
height=1, width=11)
self.button_showobj.grid(row=3, column=3)
self.lableshow=Label(self.frame1, text='', font=("Times NewRoman", 10)).grid(column=1, row=4,
padx=10,
pady=25)
self.showobj=StringVar()
def callback1(self):
cmd = 'python test.py'
output = subprocess.check_output(cmd, shell=True)
self.lableshow['text'] = self.showobj
目前没有回答
相关问题 更多 >
编程相关推荐