def supportsINotify(self):
        """
        Return C{True} if we can use the inotify API on this platform.

        @since: 10.1
        """
        try:
            from twisted.python._inotify import INotifyError, init
        except ImportError:
            return False

        try:
            os.close(init())
        except INotifyError:
            return False
        return True

        Return C{True} if we can use the inotify API on this platform.

        @since: 10.1
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/runtime.py