On this page
  1. fcntl.ioctl
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

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

REPL Inspect

from fcntl import ioctl
help(ioctl)

Linked from

Related notes