def check_terminal(self):
"""
Check if stdout is read by a terminal, for warning about UTF-8 support
"""
if sys.platform == 'win32' and sys.stdin.isatty():
if self.fn or os.path.exists(POPUP_DISPLAYED_PATH):
return
try:
import Tkinter
import tkMessageBox
root = Tkinter.Tk()
root.withdraw()
tkMessageBox.showinfo("Malstrings One-time popup", TERM_MSG)
with open(POPUP_DISPLAYED_PATH, 'w') as writer:
writer.write('True')
except Exception:
pass
评论列表
文章目录