Show More
@@ -288,7 +288,7 b" if pycompat.osname == 'nt':" | |||||
288 | ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)', |
|
288 | ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)', | |
289 | re.MULTILINE | re.DOTALL) |
|
289 | re.MULTILINE | re.DOTALL) | |
290 |
|
290 | |||
291 |
def win32print(text, |
|
291 | def win32print(text, writefunc, **opts): | |
292 | label = opts.get('label', '') |
|
292 | label = opts.get('label', '') | |
293 | attr = origattr |
|
293 | attr = origattr | |
294 |
|
294 | |||
@@ -325,7 +325,7 b" if pycompat.osname == 'nt':" | |||||
325 | if sattr: |
|
325 | if sattr: | |
326 | attr = mapcolor(int(sattr), attr) |
|
326 | attr = mapcolor(int(sattr), attr) | |
327 | _kernel32.SetConsoleTextAttribute(stdout, attr) |
|
327 | _kernel32.SetConsoleTextAttribute(stdout, attr) | |
328 |
|
|
328 | writefunc(m.group(2), **opts) | |
329 | m = re.match(ansire, m.group(3)) |
|
329 | m = re.match(ansire, m.group(3)) | |
330 | finally: |
|
330 | finally: | |
331 | # Explicitly reset original attributes |
|
331 | # Explicitly reset original attributes |
General Comments 0
You need to be logged in to leave comments.
Login now