def get_fdmax(default=None):
 fdmax = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
 if (fdmax == resource.RLIM_INFINITY):
  return default
 return fdmax

def get_fdmax ( default = None ) : fdmax = resource . getrlimit ( resource . RLIMIT_NOFILE ) [ 1 ] if ( fdmax == resource . RLIM_INFINITY ) : return default return fdmax
returns the maximum number of open file descriptors on this system .