FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-escpos/examples/qr_code.py at master · python-escpos/python-escpos · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
python-escpos
/
python-escpos
Public
Notifications
You must be signed in to change notification settings
Fork
316
Star
1.3k
Code
Issues
60
Pull requests
12
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-escpos
/
examples
/
qr_code.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (14 loc) · 393 Bytes
Breadcrumbs
python-escpos
/
examples
/
qr_code.py
Copy path
File metadata and controls
22 lines (14 loc) · 393 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Print example QR codes."""
import
sys
from
escpos
.
printer
import
Usb
def
usage
():
"""Print information on usage."""
print
(
"usage: qr_code.py <content>"
)
if
__name__
==
"__main__"
:
if
len
(
sys
.
argv
)
!=
2
:
usage
()
sys
.
exit
(
1
)
content
=
sys
.
argv
[
1
]
# Adapt to your needs
p
=
Usb
(
0x0416
,
0x5011
,
profile
=
"POS-5890"
)
p
.
qr
(
content
,
center
=
True
)
Back
|
FazBrowse Home
|
New Git URL