Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af330b9

Browse files
authored
Tips for long printing
1 parent 06496c6 commit af330b9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,12 @@ if dev:
7070
else:
7171
print('Could not find device')
7272
```
73+
74+
75+
Long printing:
76+
You might need to break the raster image up into chunks, and then send to the printer...
77+
```
78+
import funcy
79+
for bytechunk in list(funcy.chunks(128*1024, raster)):
80+
dev.write(2, bytechunk)
81+
```

0 commit comments

Comments
 (0)