Skip to content

Commit 14fa11e

Browse files
committed
Few simple ports to py3 in server scripts
1 parent 0127efa commit 14fa11e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

servers/scripts/big.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python3
22
# coding=utf-8
33
import readline
44
import sys

servers/scripts/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python3
22
import sys
33
s = 'broadcast "'
44
for line in sys.stdin:

servers/scripts/saverace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python3
22
import _mysql
33
f = open('race')
44
for l in f:
55
x = l.rstrip('\n').split("\t")
66
x[1] = _mysql.escape_string(x[1])
7-
print 'insert into record_race(Map, Name, Timestamp, Time, cp1, cp2, cp3, cp4, cp5, cp6, cp7, cp8, cp9, cp10, cp11, cp12, cp13, cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25) VALUES ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s");' % tuple(x)
7+
print('insert into record_race(Map, Name, Timestamp, Time, cp1, cp2, cp3, cp4, cp5, cp6, cp7, cp8, cp9, cp10, cp11, cp12, cp13, cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25) VALUES ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s");' % tuple(x))

servers/scripts/saveteamsrace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python3
22
import _mysql
33
f = open('teamrace')
44
for l in f:
55
x = l.rstrip('\n').split("\t")
66
x[1] = _mysql.escape_string(x[1])
7-
print 'insert into record_teamrace(Map, Name, Timestamp, Time, ID) VALUES ("%s", "%s", "%s", "%s", "%s");' % tuple(x)
7+
print('insert into record_teamrace(Map, Name, Timestamp, Time, ID) VALUES ("%s", "%s", "%s", "%s", "%s");' % tuple(x))

servers/scripts/toinserts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python3
22
import sys
33

44
for line in sys.stdin:
55
args = tuple(map(lambda x: x.strip(), line.split("|"))[1:30])
6-
print "INSERT IGNORE INTO record_race(Map, Name, Timestamp, Time, cp1, cp2, cp3, cp4, cp5, cp6, cp7, cp8, cp9, cp10, cp11, cp12, cp13, cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');" % args
6+
print("INSERT IGNORE INTO record_race(Map, Name, Timestamp, Time, cp1, cp2, cp3, cp4, cp5, cp6, cp7, cp8, cp9, cp10, cp11, cp12, cp13, cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');" % args)

0 commit comments

Comments
 (0)