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

os.close

Prev: os.chown | Up: os | Next: os.cpu_count
Rel: os.abort, os.access, os.chdir, os.chmod
Ref: docs.python.org — os.close
Tags: #public #python3 #stdlib #os


Import

import os
from os import close

Signature & Overview

os.close(fd)

Close a file descriptor.

Usage

import os

r_fd, w_fd = os.pipe()
os.close(r_fd)
os.close(w_fd)

Gotchas

REPL Inspect

from os import close
help(close)

Linked from

Related notes