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>
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
import sys
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import framebuf
|
import framebuf
|
||||||
from array import array
|
from array import array
|
||||||
@@ -18,8 +16,8 @@ def print_buffer(buffer, width, height):
|
|||||||
for row in range(height):
|
for row in range(height):
|
||||||
for col in range(width):
|
for col in range(width):
|
||||||
val = buffer[(row * width) + col]
|
val = buffer[(row * width) + col]
|
||||||
sys.stdout.write(" {:02x}".format(val) if val else " ··")
|
print(" {:02x}".format(val) if val else " ··", end="")
|
||||||
sys.stdout.write("\n")
|
print()
|
||||||
|
|
||||||
|
|
||||||
buf = bytearray(70 * 70)
|
buf = bytearray(70 * 70)
|
||||||
|
|||||||
Reference in New Issue
Block a user