Skip to content

Commit 9a521f7

Browse files
committed
look for python3 executable
1 parent c3d2c84 commit 9a521f7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
import os
44
from eansearch import EANSearch
@@ -8,6 +8,8 @@
88
apiToken = os.environ['EAN_SEARCH_API_TOKEN']
99
ean = "5099750442227" # Thriller
1010
#ean = "5099750442228" # error
11+
#ean = "195949821844" # 12-digit UPC
12+
#ean = "5-099750442227" # extra char
1113

1214
eansearch = EANSearch(apiToken)
1315

@@ -17,6 +19,7 @@
1719
# more detailed result, preferably in English (1)
1820
product = eansearch.barcodeSearch(ean, 1)
1921
print(ean, " is ", product["name"].encode("utf-8"), " from category ", product["categoryName"], " issued in ", product["issuingCountry"])
22+
exit(0)
2023

2124
isbn = "1119578884"
2225
title = eansearch.isbnLookup(isbn)

0 commit comments

Comments
 (0)