On this page
fcntl.ioctl
Prev: fcntl.flock | Up: fcntl | Next: fcntl.lockf
Rel: fcntl.fcntl, fcntl.flock, fcntl.lockf
Ref: docs.python.org — fcntl.ioctl
Tags: #public #python3 #stdlib #fcntl
Import
import fcntl
from fcntl import ioctl
Signature & Overview
fcntl.ioctl(fd, request, arg=0, mutate_flag=True, /)
Perform the operation request on file descriptor fd.
Usage
import fcntl
# Low-level Unix device-control syscall (e.g., querying terminal window size via TIOCGWINSZ)
assert callable(fcntl.ioctl)
Gotchas
- Unix-only and device-specific: For terminal dimensions, use
shutil.get_terminal_size()instead of rawioctl().
REPL Inspect
from fcntl import ioctl
help(ioctl)
Linked from
Related notes
- tuts/python3/stdlib_module/fcntl/fcntl Linked here; links to this page; shared tags: #fcntl, #stdlib
- tuts/python3/stdlib_module/fcntl/flock Linked here; links to this page; shared tags: #fcntl, #stdlib
- tuts/python3/stdlib_module/fcntl/lockf Linked here; links to this page; shared tags: #fcntl, #stdlib
- tuts/python3/stdlib_module/fcntl links to this page; shared tags: #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
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib