def set_messaging_procedures(s_gui_flag):
    """
	2017_05_31. This def was added in order to
	control the GUI messaging, and limit it to
	the processes that call def mymain from
	the GUI-based program.  Console based calls
	will have the flag set to "False."
	"""
    global ACTIVATE_GUI_MESSAGING
    if s_gui_flag == 'True':
        global GUIERR
        global GUIINFO
        ACTIVATE_GUI_MESSAGING = True
        from agestrucne.pgguiutilities import PGGUIErrorMessage
        from agestrucne.pgguiutilities import PGGUIInfoMessage
        GUIERR = PGGUIErrorMessage
        GUIINFO = PGGUIInfoMessage
    elif s_gui_flag == 'False':
        ACTIVATE_GUI_MESSAGING = False
    else:
        s_msg = ('In pgdriveneestimator, def set_messaging_procedures, ' +
            'the program found an unknown value for the ' +
            'flag that indicates whether to use GUI ' + 'messaging: ' +
            s_gui_flag + '.')
        raise Exception(s_msg)
    return
