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

posix.ctermid

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


Import

import posix
from posix import ctermid

Signature & Overview

posix.ctermid()

Return the name of the controlling terminal for this process.

Usage

import os

if hasattr(os, 'ctermid'):
    assert os.ctermid().startswith('/')

Gotchas

REPL Inspect

from posix import ctermid
help(ctermid)

Linked from

Related notes