Back to index

python3.2  3.2.2
Functions | Variables
tty Namespace Reference

Functions

def setraw
def setcbreak

Variables

list __all__ = ["setraw", "setcbreak"]
int IFLAG = 0
int OFLAG = 1
int CFLAG = 2
int LFLAG = 3
int ISPEED = 4
int OSPEED = 5
int CC = 6

Detailed Description

Terminal utilities.

Function Documentation

def tty.setcbreak (   fd,
  when = TCSAFLUSH 
)
Put terminal into a cbreak mode.

Definition at line 30 of file tty.py.

00030 
00031 def setcbreak(fd, when=TCSAFLUSH):
00032     """Put terminal into a cbreak mode."""
00033     mode = tcgetattr(fd)
00034     mode[LFLAG] = mode[LFLAG] & ~(ECHO | ICANON)
00035     mode[CC][VMIN] = 1
00036     mode[CC][VTIME] = 0
00037     tcsetattr(fd, when, mode)

Here is the caller graph for this function:

def tty.setraw (   fd,
  when = TCSAFLUSH 
)
Put terminal into a raw mode.

Definition at line 18 of file tty.py.

00018 
00019 def setraw(fd, when=TCSAFLUSH):
00020     """Put terminal into a raw mode."""
00021     mode = tcgetattr(fd)
00022     mode[IFLAG] = mode[IFLAG] & ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON)
00023     mode[OFLAG] = mode[OFLAG] & ~(OPOST)
00024     mode[CFLAG] = mode[CFLAG] & ~(CSIZE | PARENB)
00025     mode[CFLAG] = mode[CFLAG] | CS8
00026     mode[LFLAG] = mode[LFLAG] & ~(ECHO | ICANON | IEXTEN | ISIG)
00027     mode[CC][VMIN] = 1
00028     mode[CC][VTIME] = 0
00029     tcsetattr(fd, when, mode)

Here is the caller graph for this function:


Variable Documentation

list tty.__all__ = ["setraw", "setcbreak"]

Definition at line 7 of file tty.py.

int tty.CC = 6

Definition at line 16 of file tty.py.

Definition at line 12 of file tty.py.

Definition at line 10 of file tty.py.

Definition at line 14 of file tty.py.

Definition at line 13 of file tty.py.

Definition at line 11 of file tty.py.

Definition at line 15 of file tty.py.