On this page
resource.getrlimit
Prev: resource.getpagesize | Up: resource | Next: resource.getrusage
Rel: resource.error, resource.getpagesize, resource.getrusage, resource.setrlimit
Ref: docs.python.org — resource.getrlimit
Tags: #public #python3 #stdlib #resource
Import
import resource
from resource import getrlimit
Signature & Overview
resource.getrlimit(resource, /)
resource.getrlimit() function.
Usage
import resource
soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE)
assert soft > 0 or soft == resource.RLIM_INFINITY
Gotchas
- Unix-only: Returns
(soft, hard)tuple for limits likeRLIMIT_NOFILEorRLIMIT_AS.
REPL Inspect
from resource import getrlimit
help(getrlimit)
Linked from
Related notes
- tuts/python3/stdlib_module/resource/error Linked here; links to this page; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource/getpagesize Linked here; links to this page; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource/getrusage Linked here; links to this page; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource/setrlimit Linked here; links to this page; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/resource/struct_rusage links to this page; shared tags: #resource, #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib