def get_fallback_emailclient(klass):
		# Don't use mimetype lookup here, this is a fallback
		if os.name == 'nt':
			return StartFile()
		elif os.name == 'darwin':
			app = Application('open')
		else: # linux and friends
			app = Application('xdg-email')

		if app.tryexec():
			return app
		else:
			return WebBrowser()
Beispiel #2
0
    def get_fallback_emailclient(klass):
        # Don't use mimetype lookup here, this is a fallback
        if os.name == 'nt':
            return StartFile()
        elif os.name == 'darwin':
            app = Application('open')
        else: # linux and friends
            app = Application('xdg-email')

        if app.tryexec():
            return app
        else:
            return WebBrowser()
	def get_fallback_filebrowser(klass):
		# Don't use mimetype lookup here, this is a fallback
		# should handle all file types
		if os.name == 'nt':
			return StartFile()
		elif os.name == 'darwin':
			app = Application('open')
		else: # linux and friends
			app = Application('xdg-open')

		if app.tryexec():
			return app
		else:
			return WebBrowser()
Beispiel #4
0
    def get_fallback_filebrowser(klass):
        # Don't use mimetype lookup here, this is a fallback
        # should handle all file types
        if os.name == 'nt':
            return StartFile()
        elif os.name == 'darwin':
            app = Application('open')
        else: # linux and friends
            app = Application('xdg-open')

        if app.tryexec():
            return app
        else:
            return WebBrowser()