lirc.client.AbstractConnection Class Reference
Python client bindings » Classes to receive keypresses

Abstract interface for all connections. More...

Inheritance diagram for lirc.client.AbstractConnection:

## Public Member Functions

def | __enter__ (self)
def | __exit__ (self, exc_type, exc, traceback)
def | readline
| Read a buffered line. More...
def | fileno (self)
| Return the file nr used for IO, suitable for select() etc. More...
def | has_data (self)
| Return true if next readline(None) won't block . More...
def | close (self)
| Close/release all resources.

## Detailed Description

Abstract interface for all connections.

Definition at line 158 of file client.py.

## Member Function Documentation

## fileno()

def lirc.client.AbstractConnection.fileno | ( |  | self,
|  |  | int
| ) |  |

Return the file nr used for IO, suitable for select() etc.

Definition at line 184 of file client.py.

## has_data()

def lirc.client.AbstractConnection.has_data | ( |  | self,
|  |  | bool
| ) |  |

Return true if next readline(None) won't block .

Definition at line 189 of file client.py.

## readline()

def lirc.client.AbstractConnection.readline | ( |  | self,
|  |  | timeout
| ) |  |

Read a buffered line.

Parameters
  - timeout: seconds.
    - If set to 0 immediately return either a line or None.
    - If set to None (default mode) use blocking read.

Returns code string as described in lircd(8) without trailing newline or None.

Raises TimeoutException if timeout > 0 expires.

Definition at line 179 of file client.py.

The documentation for this class was generated from the following file:

- /home/mk/tmp/lirc/python-pkg/lirc/client.py (c46974b 2017-01-23 02:17:12 +0100)