Merge pull request #4 from leres/master
Minor python3 fixes; pick up print_function from futures and
This commit is contained in:
commit
c3465e05c1
1 changed files with 5 additions and 3 deletions
|
@ -33,6 +33,8 @@
|
||||||
# spachner21 in the Silicon Labs Interface Forum. It is provided here
|
# spachner21 in the Silicon Labs Interface Forum. It is provided here
|
||||||
# as public domain.
|
# as public domain.
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import serial.tools.list_ports
|
import serial.tools.list_ports
|
||||||
|
|
||||||
|
@ -49,10 +51,10 @@ pl.sort(key=lambda x: x.location, reverse=False)
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
for p in pl:
|
for p in pl:
|
||||||
if str(p.location) == sys.argv[1]:
|
if str(p.location) == sys.argv[1]:
|
||||||
print p.device
|
print(p.device)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print sys.argv[1]
|
print(sys.argv[1])
|
||||||
else:
|
else:
|
||||||
for p in pl:
|
for p in pl:
|
||||||
print p.location + " " + p.device
|
print(p.location + " " + p.device)
|
||||||
|
|
Loading…
Reference in a new issue