src/cpython/resource

Lets

RLIM_INFINITY: int = to(getAttr(pyImport("resource"), "RLIM_INFINITY"), int)
RLIMIT_CORE: int = to(getAttr(pyImport("resource"), "RLIMIT_CORE"), int)
RLIMIT_CPU: int = to(getAttr(pyImport("resource"), "RLIMIT_CPU"), int)
RLIMIT_FSIZE: int = to(getAttr(pyImport("resource"), "RLIMIT_FSIZE"), int)
RLIMIT_DATA: int = to(getAttr(pyImport("resource"), "RLIMIT_DATA"), int)
RLIMIT_STACK: int = to(getAttr(pyImport("resource"), "RLIMIT_STACK"), int)
RLIMIT_RSS: int = to(getAttr(pyImport("resource"), "RLIMIT_RSS"), int)
RLIMIT_NPROC: int = to(getAttr(pyImport("resource"), "RLIMIT_NPROC"), int)
RLIMIT_NOFILE: int = to(getAttr(pyImport("resource"), "RLIMIT_NOFILE"), int)
RLIMIT_OFILE: int = to(getAttr(pyImport("resource"), "RLIMIT_OFILE"), int)
RLIMIT_MEMLOCK: int = to(getAttr(pyImport("resource"), "RLIMIT_MEMLOCK"), int)
RLIMIT_VMEM: int = to(getAttr(pyImport("resource"), "RLIMIT_VMEM"), int)
RLIMIT_AS: int = to(getAttr(pyImport("resource"), "RLIMIT_AS"), int)
RLIMIT_MSGQUEUE: int = to(getAttr(pyImport("resource"), "RLIMIT_MSGQUEUE"), int)
RLIMIT_NICE: int = to(getAttr(pyImport("resource"), "RLIMIT_NICE"), int)
RLIMIT_RTPRIO: int = to(getAttr(pyImport("resource"), "RLIMIT_RTPRIO"), int)
RLIMIT_RTTIME: int = to(getAttr(pyImport("resource"), "RLIMIT_RTTIME"), int)
RLIMIT_SIGPENDING: int = to(getAttr(pyImport("resource"), "RLIMIT_SIGPENDING"),
                            int)
RLIMIT_SBSIZE: int = to(getAttr(pyImport("resource"), "RLIMIT_SBSIZE"), int)
RLIMIT_SWAP: int = to(getAttr(pyImport("resource"), "RLIMIT_SWAP"), int)
RLIMIT_NPTS: int = to(getAttr(pyImport("resource"), "RLIMIT_NPTS"), int)
RLIMIT_KQUEUES: int = to(getAttr(pyImport("resource"), "RLIMIT_KQUEUES"), int)
RUSAGE_SELF: int = to(getAttr(pyImport("resource"), "RUSAGE_SELF"), int)
RUSAGE_CHILDREN: int = to(getAttr(pyImport("resource"), "RUSAGE_CHILDREN"), int)
RUSAGE_BOTH: int = to(getAttr(pyImport("resource"), "RUSAGE_BOTH"), int)
RUSAGE_THREAD: int = to(getAttr(pyImport("resource"), "RUSAGE_THREAD"), int)

Procs

proc getpagesize(): int {....raises: [Exception, ValueError, OSError, IOError,
                                   EOFError, KeyError], tags: [RootEffect].}
proc prlimit(pid: int; resource: auto; limits: tuple[soft, hard: int])
proc prlimit(pid: int; resource: auto)
proc getrlimit(resource: auto): tuple[soft, hard: int]
proc setrlimit(resource: auto; limits: tuple[soft, hard: int])
proc getrusage(who: int): tuple[ru_utime, ru_stime: float, ru_maxrss, ru_ixrss,
    ru_idrss, ru_isrss, ru_minflt, ru_majflt, ru_nswap, ru_inblock, ru_oublock,
    ru_msgsnd, ru_msgrcv, ru_nsignals, ru_nvcsw, ru_nivcsw: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}