LIRC libraries
LinuxInfraredRemoteControl
 All Classes Files Functions Variables Typedefs Enumerations Macros Modules Pages
Python client bindings

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

Modules

 Classes to receive keypresses
 Interface to read raw code strings like irw(1) or translated application strings like ircat(1).
 
 Classes to send commands
 Classes to send a Command to lircd and parse the reply.
 
 Commands to control lircd
 Canned classes, one for each command in the lircd(8) socket interface.
 
 Commands to control lircrcd
 Canned classes, one for each command in the lircrcd(l8) socket interface.
 

Files

file  _client.c
 python bindings for part of lirc_client.hThese bindings provides python3 access to some of the lirc_client.h functions.
 
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

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

Variables

string 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

def lirc.client.get_default_lircrc_path (   str)

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.

def lirc.client.get_default_socket_path (   str)

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.