parent
294c6ad459
commit
c177008603
|
@ -1,4 +1,5 @@
|
|||
# This GUI is a fork of the brilliant https://github.com/marcelstoer/nodemcu-pyflasher
|
||||
import io
|
||||
import re
|
||||
import sys
|
||||
import threading
|
||||
|
@ -28,7 +29,7 @@ BACK_COLORS = {**COLORS, None: wx.BLACK}
|
|||
|
||||
|
||||
# See discussion at http://stackoverflow.com/q/41101897/131929
|
||||
class RedirectText:
|
||||
class RedirectText(io.TextIOBase):
|
||||
def __init__(self, text_ctrl):
|
||||
self._out = text_ctrl
|
||||
self._i = 0
|
||||
|
@ -139,9 +140,10 @@ class RedirectText:
|
|||
self._write_line()
|
||||
self._line = ''
|
||||
continue
|
||||
return len(string)
|
||||
|
||||
def flush(self):
|
||||
pass
|
||||
def writable(self):
|
||||
return True
|
||||
|
||||
|
||||
class FlashingThread(threading.Thread):
|
||||
|
|
Loading…
Reference in New Issue