Is there a way to detect the internet browsers "registered" on the system my script is running on, and if possible get the location of the browser's executable?

I don't mind if it requires branching the code by platform. And frankly, I don't mind if you give me a response that only works on one platform. I'm trying to gather as much solutions as I possibly can.

Don't know if you are aware of Python's webbrowser class. It allows you to display web-based docs, etc. You can choose a particular browser or use the default browser. I don't know if it will tell you what the default browser is though.

commented: you've been helpful +3

This works fine for the default browser. I wanted there to be multiple choices though. I suppose a try except on the get() might work but meh. Anyway, thanks for the guidance.
I'll roll with the default browser for now until I can get back to this and rack my brain over it.

A try/except is the only thing that I can think of. Python might not even know what the default browser is since the interpreter probably links to a system resource named defaultbrowser or whatever.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.