Capturing Return Values
From CASA Guides
Some tasks return information to the interface. For example, the imstat task returns a Python dictionary with the image statistics in it. To catch these return statistics, you must assign a variable to the task call. For example:
xstat=imstat('ngc5921.clean.image')
To see what is in the dictionary, type the variable name (in this case, xstat) at the command line.