commit d706a8afc2519d933784fc21e4a6f9d0bbe7a26b
Author: David Sorber <david.sorber@gmail.com>
Date:   Sat Jan 22 10:04:36 2022 -0500

    Adding local updates to display.py that were never properly committed.

diff --git a/software/misc/display.py b/software/misc/display.py
index 3488f64..c8fc164 100755
--- a/software/misc/display.py
+++ b/software/misc/display.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 import os
 import subprocess
 import sys
@@ -19,7 +19,7 @@ def make_bold(string):
 
 def get_ipv4_addr(interface):
     cmd = 'ifconfig {:s}'.format(interface)
-    for line in subprocess.check_output(cmd, shell=True).split('\n'):
+    for line in subprocess.check_output(cmd, shell=True).decode('utf-8').split('\n'):
         if line.strip().startswith('inet '):
             return line.split()[1]
     else:
@@ -28,17 +28,17 @@ def get_ipv4_addr(interface):
 def get_fs_usage(mount_point):
     cmd = 'df -h | grep {:s}'.format(mount_point)
     try:
-        line = subprocess.check_output(cmd, shell=True).split('\n')[0]
+        line = subprocess.check_output(cmd, shell=True).decode('utf-8').split('\n')[0]
     except IndexError:
         return '{:s}MOUNT POINT NOT FOUND{:s}'.format(RED, END)
     line_tokens = line.split()
     
     usage_percent = int(line_tokens[4][:-1])
-    percent_str = '{:s}{:>3d}%{:s}'.format(BOLD, usage_percent, END)
+    percent_str = '{:s}{:>2d}%{:s}'.format(BOLD, usage_percent, END)
     if usage_percent > 90:
-        percent_str = '{:s}{:s}{:>3d}%{:s}'.format(BOLD, RED, usage_percent, END)
+        percent_str = '{:s}{:s}{:>2d}%{:s}'.format(BOLD, RED, usage_percent, END)
     elif usage_percent > 70:
-        percent_str = '{:s}{:s}{:>3d}%{:s}'.format(BOLD, YELLOW, usage_percent, END)
+        percent_str = '{:s}{:s}{:>2d}%{:s}'.format(BOLD, YELLOW, usage_percent, END)
     
     
     output = '{:10s} ({:<9s}) - {:>4s} of {:>4s} [ {:s} ] used; '\
@@ -57,33 +57,34 @@ def main():
     rows = int(rows)
     columns = int(columns)
 
-    hostname = subprocess.check_output('hostname', shell=True).strip()
+    hostname = subprocess.check_output('hostname', shell=True).decode('utf-8').strip()
 
     ip_addr = get_ipv4_addr('enp4s0')
     root_stats = get_fs_usage('/dev/sda2')
     storage_stats = get_fs_usage('/dev/md0')
 
-    print YELLOW + BOLD + '       _           _                  '
-    print '      | |         | |                 '
-    print ' _ __ | |__   __ _| | __ _ _ __ __  __'
-    print "| '_ \| '_ \ / _` | |/ _` | '_ \\ \/ /"
-    print '| |_) | | | | (_| | | (_| | | | |>  < '
-    print "| .__/|_| |_|\__,_|_|\__,_|_| |_/_/\_\ "
-    print '| |                                   '
-    print '|_|                                   ' + END
-    print PURPLE + BOLD + '-' * columns + END
-    print
-    print '{:<17s} {:s}   {:s} {:s}'.format(make_bold('Hostname:'), hostname, 
-                                            make_bold('IP:'), ip_addr)
-    print '{:<17s} {:s}'.format(make_bold('Storage:'), root_stats)
-    print '{:<17s} {:s}'.format(make_bold(' '), storage_stats)
-    print
+    print(YELLOW + BOLD + '       _           _                  ')
+    print('      | |         | |                 ')
+    print(' _ __ | |__   __ _| | __ _ _ __ __  __')
+    print("| '_ \| '_ \ / _` | |/ _` | '_ \\ \/ /")
+    print('| |_) | | | | (_| | | (_| | | | |>  < ')
+    print("| .__/|_| |_|\__,_|_|\__,_|_| |_/_/\_\ ")
+    print('| |                                   ')
+    print('|_|                                   ' + END)
+    print(PURPLE + BOLD + '-' * columns + END)
+    print()
+    # ~ print('{:<17s} {:s}'.format(make_bold('Hostname:'), hostname))
+    print('{:<17s} {:s}   {:s} {:s}'.format(make_bold('Hostname:'), hostname, 
+                                            make_bold('IP:'), ip_addr))
+    print('{:<17s} {:s}'.format(make_bold('Storage:'), root_stats))
+    print('{:<17s} {:s}'.format(make_bold(' '), storage_stats))
+    print()
 
-    print PURPLE + BOLD + '-' * columns + END
-    print
-    print subprocess.check_output('w -i', shell=True)
-    print PURPLE + BOLD + '-' * columns + END
-    print
+    print(PURPLE + BOLD + '-' * columns + END)
+    print()
+    print(subprocess.check_output('w -i', shell=True).decode('utf-8'))
+    print(PURPLE + BOLD + '-' * columns + END)
+    print()
 
 if __name__ == '__main__':
     sys.exit(main())
