'This method places streamed stdout and stderr into a threaded IPC queue target.  Received data
is printed and saved to that thread\'s queue. The calling thread can then retrieve the data using
thread.stdout and thread.stderr.'

def enqueue_output(self, stdout, stdout_queue, stderr, stderr_queue):

    stdout_logger = logging.getLogger('install_environment.STDOUT')
    stderr_logger = logging.getLogger('install_environment.STDERR')
    for line in iter(stdout.readline, ''):
        output = line.rstrip()
        stdout_logger.debug(output)
        stdout_queue.put(output)
    stdout_queue.put(None)
    for line in iter(stderr.readline, ''):
        output = line.rstrip()
        stderr_logger.debug(output)
        stderr_queue.put(output)
    stderr_queue.put(None)
