Small fixes for Python 3
This commit is contained in:
@@ -121,7 +121,7 @@ class Process(object):
|
|||||||
|
|
||||||
def stdin(self, text):
|
def stdin(self, text):
|
||||||
if self.pid.stdin:
|
if self.pid.stdin:
|
||||||
self.pid.stdin.write(text)
|
self.pid.stdin.write(text.encode('utf-8'))
|
||||||
self.pid.stdin.flush()
|
self.pid.stdin.flush()
|
||||||
|
|
||||||
def get_output(self):
|
def get_output(self):
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ class Timer(object):
|
|||||||
return '-%ds' % seconds
|
return '-%ds' % seconds
|
||||||
|
|
||||||
rem = int(seconds)
|
rem = int(seconds)
|
||||||
hours = rem / 3600
|
hours = int(rem / 3600)
|
||||||
mins = (rem % 3600) / 60
|
mins = int((rem % 3600) / 60)
|
||||||
secs = rem % 60
|
secs = rem % 60
|
||||||
if hours > 0:
|
if hours > 0:
|
||||||
return '%dh%dm%ds' % (hours, mins, secs)
|
return '%dh%dm%ds' % (hours, mins, secs)
|
||||||
|
|||||||
Reference in New Issue
Block a user