LIRC libraries
Linux Infrared Remote Control
Loading...
Searching...
No Matches
Python client bindings

Unstable python interfaces to read and send lirc data. More...

Topics

 Classes to receive keypresses
 Interface to read raw code strings like irw(1) or translated application strings like ircat(1).

Files

file  _client.c
 python bindings for part of lirc_client.h
file  async_client.py
 Asynchronous python bindings for the lircd socket interface.
file  client.py
 Top-level python bindings for the lircd socket interface.

Classes

class  lirc.client.BadPacketException
 Malformed or otherwise unparsable packet received. More...
class  lirc.client.TimeoutException
 Timeout receiving data from remote host. More...

Functions

str lirc.client.get_default_socket_path ()
 Get default value for the lircd socket path, using (falling priority):
str lirc.client.get_default_lircrc_path ()
 Get default path to the lircrc file according to (falling priority):

Variables

str lirc.client._DEFAULT_PROG

Detailed Description

Unstable python interfaces to read and send lirc data.

Sending is a pure python implementation described in Classes to send commands.

Reading data uses a C extension module, see Classes to receive keypresses. This also includes AsyncConnection with a small asynchronous interface to read data.

The otherwise undocumented file config.py, which can be imported using import lirc.config, provides access to the paths defined when running configure such as VARRUNDIR (often /var/run) and SYSCONFDIR (typically /etc).

Function Documentation

◆ get_default_lircrc_path()

str lirc.client.get_default_lircrc_path ( )

Get default path to the lircrc file according to (falling priority):

  • $XDG_CONFIG_HOME/lircrc if environment variable and file exists.
  • ~/.config/lircrc if it exists.
  • ~/.lircrc if it exists
  • A hardcoded default lirc.config.SYSCONFDIR/lirc/lircrc, whether it exists or not.

Definition at line 83 of file client.py.

◆ get_default_socket_path()

str lirc.client.get_default_socket_path ( )

Get default value for the lircd socket path, using (falling priority):

  • The environment variable LIRC_SOCKET_PATH.
  • The 'output' value in the lirc_options.conf file if value and the corresponding file exists.
  • A hardcoded default lirc.config.VARRUNDIR/lirc/lircd, possibly non-existing.

Definition at line 54 of file client.py.

Variable Documentation

◆ _DEFAULT_PROG

str lirc.client._DEFAULT_PROG
protected

Definition at line 43 of file client.py.