I have question to you guys about qgis installation path. Is there any way to get this path programmatically?

I'm working on something similar to plugin installer and it would be great to have it.

Any ideas?