Skip to content

Commit 0dc80e8

Browse files
committed
python >= python2.6 support
1 parent ddaf08b commit 0dc80e8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/tools/biglink

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22

3+
from __future__ import print_function
34
import os
45
import sys
56
import subprocess
@@ -39,10 +40,10 @@ while args:
3940
unique_args.insert(0, a)
4041

4142

42-
print 'Biglink create %s library' % sys.argv[1]
43-
print 'Biglink arguments:'
43+
print('Biglink create %s library' % sys.argv[1])
44+
print('Biglink arguments:')
4445
for arg in unique_args:
45-
print '', arg
46+
print(' %s' % arg)
4647

4748
args = os.environ['CC'].split() + \
4849
['-shared', '-O3', '-o', sys.argv[1]] + \

src/tools/liblink

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

3+
from __future__ import print_function
34
import sys
45
import subprocess
56
from os import environ
@@ -51,8 +52,8 @@ while i < len(sys.argv):
5152
continue
5253

5354
if opt.startswith("-"):
54-
print sys.argv
55-
print "Unknown option: ", opt
55+
print(sys.argv)
56+
print("Unknown option: %s" % opt)
5657
sys.exit(1)
5758

5859
if not opt.endswith('.o'):
@@ -61,12 +62,12 @@ while i < len(sys.argv):
6162
objects.append(opt)
6263

6364

64-
f = file(output, "w")
65+
f = open(output, "w")
6566
f.close()
6667

6768
output = join(environ.get('LIBLINK_PATH'), basename(output))
6869

69-
f = file(output + ".libs", "w")
70+
f = open(output + ".libs", "w")
7071
f.write(" ".join(libs))
7172
f.close()
7273

0 commit comments

Comments
 (0)