kopia lustrzana https://github.com/micropython/micropython
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
rodzic
7211bafb33
commit
40687451bb
|
@ -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)
|
||||
|
|
Ładowanie…
Reference in New Issue