def _listOpenFDs():
    dname = "/dev/fd"
    try:
        return [int(fd) for fd in os.listdir(dname)]
    except:
        dname = "/proc/%d/fd" % (os.getpid(),)
        try:
            return [int(fd) for fd in os.listdir(dname)]
        except:
            try:
                import resource
                maxfds = resource.getrlimit(resource.RLIMIT_NOFILE)[1] + 1
                # OS-X reports 9223372036854775808. That's a lot of fds
                # to close
                if maxfds > 1024:
                    maxfds = 1024
            except:
                maxfds = 256
            return xrange(maxfds)
Add a callback to be called when a specific section or key has
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/internet/process.py/_listOpenFDs--crossover with--dataset/ETHPy150Open kivy/kivy/kivy/config.py/ConfigParser.add_callback