How to redirect in real time STDOUT from imported module to Tkinter Text Widget in python?

前端 未结 3 465
情书的邮戳
情书的邮戳 2020-12-19 10:17

I am trying to redirect stdout into a Tkinter Text widget in real time using Python 2.7.2 on Windows 7. In my code below, I intended to have a print statement appear in the

3条回答
  •  眼角桃花
    2020-12-19 10:32

    I made a class which copies stdout write calls to a tkinter widget be it a Label or a Text. Works for me on Python3.3.1/WindowsXp.:

    https://stackoverflow.com/a/16460878/2334951

提交回复
热议问题