From f2c06622b73212265ae1a8b8d7aa1c04825b5189 Mon Sep 17 00:00:00 2001 From: Craig Leres Date: Sun, 21 Jul 2019 13:50:00 -0700 Subject: [PATCH] Minor python3 fixes; pick up print_function from futures and convert some print statements to use print() --- tools/findcp2102.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/findcp2102.py b/tools/findcp2102.py index 41a3485d4..46c2f0be7 100755 --- a/tools/findcp2102.py +++ b/tools/findcp2102.py @@ -33,6 +33,8 @@ # spachner21 in the Silicon Labs Interface Forum. It is provided here # as public domain. +from __future__ import print_function + import sys import serial.tools.list_ports @@ -49,10 +51,10 @@ pl.sort(key=lambda x: x.location, reverse=False) if len(sys.argv) > 1: for p in pl: if str(p.location) == sys.argv[1]: - print p.device + print(p.device) break else: - print sys.argv[1] + print(sys.argv[1]) else: for p in pl: - print p.location + " " + p.device + print(p.location + " " + p.device)