#NEWLINE# def has_browser( ) : #NEWLINE# #INDENT# valid_browsers = [ 'MacOSX' , 'Chrome' , 'Chromium' , 'Firefox' , 'Safari' , 'Opera' , 'windows-default' ] #NEWLINE# for browser in valid_browsers : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# webbrowser . get ( valid_browsers ) #NEWLINE# return True #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# return False