-# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
-#
# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
# Logic to spawn a sub-process and interact with its stdio.
os.chdir(cwd)
os.execvp(args[0], args)
except:
- print 'CHILD EXECEPTION:'
+ print('CHILD EXECEPTION:')
import traceback
traceback.print_exc()
finally:
the expected time.
"""
- for pi in xrange(len(patterns)):
+ for pi in range(len(patterns)):
if type(patterns[pi]) == type(''):
patterns[pi] = re.compile(patterns[pi])
while True:
earliest_m = None
earliest_pi = None
- for pi in xrange(len(patterns)):
+ for pi in range(len(patterns)):
pattern = patterns[pi]
m = pattern.search(self.buf)
if not m:
"""
os.close(self.fd)
- for i in xrange(100):
+ for i in range(100):
if not self.isalive():
break
time.sleep(0.1)