Using 'what' command inside the script

You are lookin for the objectdump method, but it seems it’s not available for Rhino on mac yet.
Try this answer: