Loading...
Searching...
No Matches
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

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

## Detailed Description

Abstract interface for all connections.

Definition at line 162 of file client.py.

## Member Function Documentation

## __enter__()

lirc.client.AbstractConnection.__enter__ | ( |  | self | ) |

Definition at line 164 of file client.py.

## __exit__()

lirc.client.AbstractConnection.__exit__ | ( |  | self,
|  |  | exc_type,
|  |  | exc,
|  |  | traceback )

Definition at line 167 of file client.py.

## close()

lirc.client.AbstractConnection.close | ( |  | self | ) |

Close/release all resources.

Reimplemented in lirc.client.LircdConnection, and lirc.client.RawConnection.

Definition at line 198 of file client.py.

## fileno()

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

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

Reimplemented in lirc.client.LircdConnection, and lirc.client.RawConnection.

Definition at line 188 of file client.py.

## has_data()

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

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

Reimplemented in lirc.client.LircdConnection, and lirc.client.RawConnection.

Definition at line 193 of file client.py.

## readline()

str lirc.client.AbstractConnection.readline | ( |  | self,
|  | float | timeout = None )

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.

Reimplemented in lirc.client.LircdConnection, and lirc.client.RawConnection.

Definition at line 183 of file client.py.

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

- client.py