Fixed my issue where the blog link in Nucleus would point to IE instead of chrome!
def open_webpage(self, webpage): webbrowser.register('chrome', None, webbrowser.GenericBrowser("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) webbrowser.get('chrome').open(webpage, new = 0, autoraise = True)
By using the register function and adding a reference to a predefined browser, a constructor (which can be None because we’ve provided an instance) and an instance. The instance is using the GenericBrowser function to open our browser executable.
This of course wouldn’t work if I was rolling out the tool to others, I’d need to use the %PROGRAMFILES(x86)% environment variable to find path.