Table of Contents
This module contains messages that are used in conjunction with the gmain() function (see grail.gsys). The typical MineSight® Grail script will contain the following lines of code,
from grail import messages
from grail import gsys
def gmain(message, data):
if message == messages.gRUN:
run_my_code()
else:
return gsys.grailmain(message, data)
However starting with v4.70, you can now simply do the following, and not have to worry about any messages,
from grail import gsys
def main():
# Run my code...
gmain = gsys.GMAIN(main, __name__)
This will take care of handling all messages, and redirecting execution to your main function.
For scripts that do not need to interact within a compass environment the most important messages are,
With MineSight® Compass, there are some additional messages that you may find of interest if you are attempting to build a "Compass Style" script.
All other messages are generally used by the MineSight® Grail system itself.
If you are executing a PYZ script from the command line some additional messages will be supplied. Namely the following.