tests/extmod/framebuf_polygon.py: Replace sys.stdout.write with print.

So the test doesn't depend on the `sys` module.

Signed-off-by: Damien George <damien@micropython.org>
pull/13543/head
Damien George 2024-01-29 13:04:20 +11:00
rodzic 7211bafb33
commit 40687451bb
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -1,5 +1,3 @@
import sys
try:
import framebuf
from array import array
@ -18,8 +16,8 @@ def print_buffer(buffer, width, height):
for row in range(height):
for col in range(width):
val = buffer[(row * width) + col]
sys.stdout.write(" {:02x}".format(val) if val else " ··")
sys.stdout.write("\n")
print(" {:02x}".format(val) if val else " ··", end="")
print()
buf = bytearray(70 * 70)