'Returns the remote machine\'s environment as a dictionary'

def get_env(self):

    env = {}
    for line in self.execute('env'):
        (key, val) = line.split('=', 1)
        env[key] = val
    return env
