Skip to content

Commit cd82062

Browse files
committed
Compatible with python 3
1 parent 396faa9 commit cd82062

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

colines

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ idx = 0
1818

1919

2020
def color_print(*args):
21-
line = " ".join(args)
21+
_line = " ".join(args)
2222
global idx
2323
idx += 1
2424
color = ECHO_COLORS[idx % len(ECHO_COLORS)]
2525
if sys.stdout.isatty():
26-
line_ = """\033[1;%sm%s\033[0m""" % (color, line)
27-
print line_
26+
print("""\033[1;%sm%s\033[0m""" % (color, _line))
2827
else:
29-
print(line)
28+
print(_line)
3029

3130

3231
if __name__ == '__main__':

0 commit comments

Comments
 (0)