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

posix.device_encoding

Prev: posix.ctermid | Up: posix | Next: posix.DirEntry
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.device_encoding
Tags: #public #python3 #stdlib #posix


Import

import posix
from posix import device_encoding

Signature & Overview

posix.device_encoding(fd)

Return a string describing the encoding of a terminal's file descriptor.

Usage

import os

enc = os.device_encoding(0)
assert enc is None or isinstance(enc, str)

Gotchas

REPL Inspect

from posix import device_encoding
help(device_encoding)

Linked from

Related notes