diff options
author | Steven Myint <git@stevenmyint.com> | 2013-10-04 08:14:19 -0700 |
---|---|---|
committer | Steven Myint <git@stevenmyint.com> | 2013-10-04 08:14:19 -0700 |
commit | 1cb3226c9d2e57b8ec280433c2ad7c990d63bae0 (patch) | |
tree | 87a6f6019ac0d9ee81b3db2b93ac704be458a75c /examples/uptime.py | |
parent | dd0479cb32e55e882a8d1391af2d5b37f25e2db7 (diff) | |
download | pexpect-git-1cb3226c9d2e57b8ec280433c2ad7c990d63bae0.tar.gz |
Modernize
Diffstat (limited to 'examples/uptime.py')
-rwxr-xr-x | examples/uptime.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/uptime.py b/examples/uptime.py index 3316600..3187a56 100755 --- a/examples/uptime.py +++ b/examples/uptime.py @@ -22,6 +22,10 @@ PEXPECT LICENSE ''' +from __future__ import print_function + +from __future__ import absolute_import + import pexpect import re @@ -68,6 +72,6 @@ if 'min' in duration: mins = str(int(p.match.group(1))) # Print the parsed fields in CSV format. -print 'days, hours, minutes, users, cpu avg 1 min, cpu avg 5 min, cpu avg 15 min' -print '%s, %s, %s, %s, %s, %s, %s' % (days, hours, mins, users, av1, av5, av15) +print('days, hours, minutes, users, cpu avg 1 min, cpu avg 5 min, cpu avg 15 min') +print('%s, %s, %s, %s, %s, %s, %s' % (days, hours, mins, users, av1, av5, av15)) |