Skip to content

Commit 6ced534

Browse files
committed
Readme examples - python3 print
1 parent 41d1965 commit 6ced534

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ rdr = RFID.RFID()
4141
while True:
4242
(error, tag_type) = rdr.request()
4343
if not error:
44-
print "Tag detected"
44+
print ("Tag detected")
4545
(error, uid) = rdr.anticoll()
4646
if not error:
47-
print "UID: " + str(uid)
47+
print ("UID: " + str(uid))
4848
#Select Tag is required before Auth
4949
if not rdr.select_tag(uid):
5050
#Auth for block 10 (block 2 of sector 2) using default shipping key A
5151
if not rdr.card_auth(rdr.auth_a, 10, [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF], uid):
5252
#This will print something like (False, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
53-
print "Reading block 10: " + str(rdr.read(10))
53+
print ("Reading block 10: " + str(rdr.read(10)))
5454
#Always stop crypto1 when done working
5555
rdr.stop_crypto()
5656

@@ -76,12 +76,12 @@ while True:
7676
#Request tag
7777
(error, data) = rdr.request()
7878
if not error:
79-
print "\nDetected"
79+
print ("\nDetected")
8080

8181
(error, uid) = rdr.anticoll()
8282
if not error:
8383
#Print UID
84-
print "Card read UID: "+str(uid[0])+","+str(uid[1])+","+str(uid[2])+","+str(uid[3])
84+
print ("Card read UID: "+str(uid[0])+","+str(uid[1])+","+str(uid[2])+","+str(uid[3]))
8585

8686
#Set tag as used in util. This will call RFID.select_tag(uid)
8787
util.set_tag(uid)

0 commit comments

Comments
 (0)