diff --git a/bin/validate_plug_ins.py b/bin/validate_plug_ins.py
index 9c0a1fd..809f17a 100755
--- a/bin/validate_plug_ins.py
+++ b/bin/validate_plug_ins.py
@@ -1,7 +1,11 @@
 #!/usr/bin/env python
 
 import sys
-import __builtin__
+try:
+    import __builtin__
+except ImportError:
+    import builtins as __builtin__
+
 import os
 
 # python puts the program's directory path in sys.path[0].  In other words,
@@ -116,7 +120,7 @@
 
     plug_in_packages_list = return_plug_in_packages_list(plug_in_dir_paths,
                                                          mch_class)
-    qpvar(plug_in_packages_list)
+    qprint_var(plug_in_packages_list)
 
     # As stated in the help text, this program must print the full paths of
     # each selected plug in.
diff --git a/lib/boot_data.py b/lib/boot_data.py
index 070a0e6..abb41b7 100755
--- a/lib/boot_data.py
+++ b/lib/boot_data.py
@@ -68,7 +68,7 @@
         for boot in boot_table:
             state_keys = ['start', 'end']
             for state_key in state_keys:
-                for sub_state in boot_table[boot][state_key]:
+                for sub_state in list(boot_table[boot][state_key]):
                     if sub_state.startswith("os_"):
                         boot_table[boot][state_key].pop(sub_state, None)
 
diff --git a/lib/gen_robot_plug_in.py b/lib/gen_robot_plug_in.py
index cfcb660..a5ce323 100755
--- a/lib/gen_robot_plug_in.py
+++ b/lib/gen_robot_plug_in.py
@@ -36,16 +36,13 @@
     """
 
     cmd_buf = "validate_plug_ins.py \"" + plug_in_dir_paths + "\""
-    if int(quiet) != 1:
-        gp.print_issuing(cmd_buf)
-    rc, out_buf = commands.getstatusoutput(cmd_buf)
+    rc, out_buf = gc.shell_cmd(cmd_buf, print_output=0)
     if rc != 0:
-        message = gp.sprint_varx("rc", rc, 1) + out_buf
-        gp.printn(out_buf, 'STDERR')
         BuiltIn().fail(gp.sprint_error("Validate plug ins call failed.  See"
                                        + " stderr text for details.\n"))
 
-    plug_in_packages_list = out_buf.split("\n")
+    # plug_in_packages_list = out_buf.split("\n")
+    plug_in_packages_list = list(filter(None, out_buf.split("\n")))
     if len(plug_in_packages_list) == 1 and plug_in_packages_list[0] == "":
         return []
 
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index 2bd0742..d40f5d8 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -12,7 +12,7 @@
 try:
     import exceptions
 except ImportError:
-    import builtins as exception
+    import builtins as exceptions
 
 import gen_print as gp
 import func_timer as ft
@@ -98,7 +98,7 @@
     for connection in sshlib.get_connections():
         # Create connection_dict from connection object.
         connection_dict = dict((key, str(value)) for key, value in
-                               connection._config.iteritems())
+                               connection._config.items())
         if dict(connection_dict, **open_connection_args) == connection_dict:
             return connection
 
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 11e9b0e..9e6aca5 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -185,8 +185,8 @@
         ffdc_dir_path_style = int(os.environ.get('FFDC_DIR_PATH_STYLE', '0'))
 
     # Convert these program parms to lists for easier processing..
-    boot_list = filter(None, boot_list.split(":"))
-    boot_stack = filter(None, boot_stack.split(":"))
+    boot_list = list(filter(None, boot_list.split(":")))
+    boot_stack = list(filter(None, boot_stack.split(":")))
 
     cleanup_boot_results_file()
     boot_results_file_path = create_boot_results_file_path(pgm_name,
@@ -644,7 +644,7 @@
     try:
         plug_in_ffdc_list = \
             open(ffdc_list_file_path, 'r').read().rstrip("\n").split("\n")
-        plug_in_ffdc_list = filter(None, plug_in_ffdc_list)
+        plug_in_ffdc_list = list(filter(None, plug_in_ffdc_list))
     except IOError:
         plug_in_ffdc_list = []
 
@@ -1011,19 +1011,10 @@
     # Process function parms.
     for parm_name in main_func_parm_list:
         # Get parm's value.
-        cmd_buf = "parm_value = loc_" + parm_name
-        exec(cmd_buf)
-        gp.dpvar(parm_name)
-        gp.dpvar(parm_value)
+        parm_value = eval("loc_" + parm_name)
+        gp.dpvars(parm_name, parm_value)
 
-        if parm_value is None:
-            # Parm was not specified by the calling function so set it to its
-            # corresponding global value.
-            cmd_buf = "loc_" + parm_name + " = BuiltIn().get_variable_value" +\
-                "(\"${" + parm_name + "}\")"
-            gp.dpissuing(cmd_buf)
-            exec(cmd_buf)
-        else:
+        if parm_value is not None:
             # Save the global value on a stack.
             cmd_buf = "save_stack.push(BuiltIn().get_variable_value(\"${" +\
                 parm_name + "}\"), \"" + parm_name + "\")"
diff --git a/lib/state.py b/lib/state.py
index 78f4cf4..4020b9c 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -151,9 +151,9 @@
 standby_match_state = DotDict([('rest', '^1$'),
                                ('chassis', '^Off$'),
                                ('bmc', '^Ready$'),
-                               ('boot_progress', '^$'),
-                               ('operating_system', '^$'),
-                               ('host', '^$')])
+                               ('boot_progress', '^Off|Unspecified$'),
+                               ('operating_system', '^Inactive$'),
+                               ('host', '^Off$')])
 
 # A match state for checking that the system is at "os running".
 os_running_match_state = DotDict([('chassis', '^On$'),
@@ -182,14 +182,12 @@
                                ('host', '^$')])
 
 
-def return_state_constant(state_name='default'):
+def return_state_constant(state_name='default_state'):
     r"""
     Return the named state dictionary constant.
     """
 
-    cmd_buf = "state = " + state_name
-    exec(cmd_buf)
-    return state
+    return eval(state_name)
 
 
 def anchor_state(state):
@@ -262,8 +260,10 @@
     if error_message != "":
         BuiltIn().fail(gp.sprint_error(error_message))
 
-    if type(match_state) in (str, unicode):
+    try:
         match_state = return_state_constant(match_state)
+    except TypeError:
+        pass
 
     default_match = (match_type == 'and')
     for key, match_state_value in match_state.items():
@@ -350,10 +350,9 @@
     if os_up:
         if 'os_ping' in req_states:
             # See if the OS pings.
-            cmd_buf = "ping -c 1 -w 2 " + os_host
-            if not quiet:
-                gp.pissuing(cmd_buf)
-            rc, out_buf = commands.getstatusoutput(cmd_buf)
+            rc, out_buf = gc.shell_cmd("ping -c 1 -w 2 " + os_host,
+                                       print_output=0, show_err=0,
+                                       ignore_err=1)
             if rc == 0:
                 os_ping = 1
 
@@ -486,10 +485,9 @@
     # Get the component states.
     if 'ping' in req_states:
         # See if the OS pings.
-        cmd_buf = "ping -c 1 -w 2 " + openbmc_host
-        if not quiet:
-            gp.pissuing(cmd_buf)
-        rc, out_buf = commands.getstatusoutput(cmd_buf)
+        rc, out_buf = gc.shell_cmd("ping -c 1 -w 2 " + openbmc_host,
+                                   print_output=0, show_err=0,
+                                   ignore_err=1)
         if rc == 0:
             ping = 1
 
@@ -497,9 +495,9 @@
         # See if the OS pings.
         cmd_buf = "ping -c 5 -w 5 " + openbmc_host +\
             " | egrep 'packet loss' | sed -re 's/.* ([0-9]+)%.*/\\1/g'"
-        if not quiet:
-            gp.pissuing(cmd_buf)
-        rc, out_buf = commands.getstatusoutput(cmd_buf)
+        rc, out_buf = gc.shell_cmd(cmd_buf,
+                                   print_output=0, show_err=0,
+                                   ignore_err=1)
         if rc == 0:
             packet_loss = out_buf.rstrip("\n")
 
@@ -509,14 +507,10 @@
         remote_cmd_buf = "read uptime filler 2>/dev/null < /proc/uptime" +\
             " && [ ! -z \"${uptime}\" ] && echo ${uptime}"
         cmd_buf = ["BMC Execute Command",
-                   re.sub('\\$', '\\$', remote_cmd_buf), 'quiet=1']
-        if not quiet:
-            # Get loc_test_mode parm for improved output on pissuing.
-            # See sprint_issuing in gen_print.py for details.
-            loc_test_mode = int(gp.get_var_value(var_name="test_mode",
-                                                 default=0))
-            grp.rpissuing_keyword(cmd_buf, loc_test_mode)
-            gp.pissuing(remote_cmd_buf, loc_test_mode)
+                   re.sub('\\$', '\\$', remote_cmd_buf), 'quiet=1',
+                   'test_mode=0']
+        gp.print_issuing(cmd_buf, 0)
+        gp.print_issuing(remote_cmd_buf, 0)
         try:
             stdout, stderr, rc =\
                 BuiltIn().wait_until_keyword_succeeds("10 sec", "0 sec",
@@ -568,10 +562,12 @@
             for url_path in ret_values:
                 for attr_name in ret_values[url_path]:
                     # Create a state key value based on the attr_name.
-                    if isinstance(ret_values[url_path][attr_name], unicode):
+                    try:
                         ret_values[url_path][attr_name] = \
                             re.sub(r'.*\.', "",
                                    ret_values[url_path][attr_name])
+                    except TypeError:
+                        pass
                     # Do some key name manipulations.
                     new_attr_name = re.sub(r'^Current|(State|Transition)$',
                                            "", attr_name)
@@ -751,8 +747,10 @@
 
     quiet = int(gp.get_var_value(quiet, 0))
 
-    if type(match_state) in (str, unicode):
+    try:
         match_state = return_state_constant(match_state)
+    except TypeError:
+        pass
 
     if not quiet:
         if invert:
diff --git a/lib/utilities.py b/lib/utilities.py
index 5093333..ae3ad24 100755
--- a/lib/utilities.py
+++ b/lib/utilities.py
@@ -118,7 +118,7 @@
 
 
 def main():
-    print get_vpd_inventory_list('../data/Palmetto.py', 'DIMM')
+    print(get_vpd_inventory_list('../data/Palmetto.py', 'DIMM'))
 
 
 if __name__ == "__main__":
