Path of slicer app

Dear developer,
I want to design a package which need the path of the slicer installed on user’s computer, is there some command that can find the path of the slicer location automatically?
Best wishes,
Joshua

# all nodes are saved relative to this path
slicer.mrmlScene.GetRootDirectory() 
# write-able folder, you can use this to store any temporary data
slicer.app.temporaryPath 
# Slicer core binary folder
slicer.app.slicerHome 
# Slicer extensions folder
slicer.app.extensionsInstallPath 
# path of a scripted module (in this example: Sample Data module SampleData.py)
slicer.modules.sampledata.path 

sorry, but I mean the launcher of slicer,
such as /Applications/Slicer.app/Contents/MacOS/Slicer
Best,
Joshua

Sorry I am not on a Mac, but what do you get with this call?

image
I think it is incomplete?
Thank you,
Joshua

If Slicer is in the Applications directory of a Mac, you should be able to use

which Slicer

from bash.

That looks correct to me. Just ignore the /Contents part and that is the mac application folder.