'Called by user to set or show the session variables'

def set(self, module_argument, value):

    try:
        value = ast.literal_eval(value)
    except Exception as e:
        pass
    action_name = ('action_%s' % module_argument.replace('.', '_'))
    if hasattr(self, action_name):
        action_func = getattr(self, action_name)
        if hasattr(action_func, '__call__'):
            action_func(module_argument, value)
    if (module_argument.count('.') == 1):
        (module_name, arg_name) = module_argument.split('.')
        self[module_name]['stored_args'][arg_name] = value
        log.info((messages.sessions.set_module_s_s_s % (module_name, arg_name, value)))
    else:
        module_name = module_argument
        if ((module_name not in self) and (module_name not in set_filters)):
            log.warn((messages.sessions.error_session_s_not_modified % module_name))
        else:
            self[module_name] = value
            log.info((messages.sessions.set_s_s % (module_name, value)))
