-1
나는 TkInter를 가지고 놀았지만 종료하는 데 문제가 있습니다.root.after가 전체 오류를 발생합니다.
from __future__ import absolute_import
from . import BasePlugin
import os, sys
import time
from Tkinter import *
class dis(BasePlugin):
def execute(self, msg, unit, address, when, printer, print_copies):
mseg = str('%s - %s' % (msg, unit))
root = Tk()
text = Text(root, wrap = 'word', bg= 'red', font= 'times 30 bold')
text.insert(INSERT, msg)
text.pack()
root.title('Pager Printer Display')
root.after(6000, _close)
root.mainloop(0)
PLUGIN = dis
을하지만 지금은 그 후 닫으 분 말할 필요 :
나는 화면에 텍스트를 얻을 수 있습니다.
그래서 피곤 끝에
def _close():
root.destroy()
를 추가했습니다 시작, 중간하지만
class dis(BasePlugin):
def _close():
root.destroy()
def execute(self, msg, unit, address, when, printer, print_copies):
mseg = str('%s - %s' % (msg, unit))
root = Tk()
text = Text(root, wrap = 'word', bg= 'red', font= 'times 30 bold')
text.insert(INSERT, msg)
text.pack()
root.title('Pager Printer Display')
root.after(6000, _close)
root.mainloop(0)
PLUGIN = dis
사람이 도움을 줄 수 예컨대
Global name _close is undefined
의 오류?
건배 중 하나는 치료를했습니다. 나는 그것을 시도 했었다는 것을 맹세한다 그러나 나는 그것에 의해 너무 좌절 될 수 있었다 :). – Shaggy89