Python bindings for LIRC.
Project description
python-lirc
===========
LIRC extension written in Cython for Python 3 (and 2).
[PyPI](https://pypi.python.org/pypi/python-lirc/)
Install
=======
You'll need to have [lirc configured](http://www.lirc.org/html/configure.html)
and you may need to install cython (`aptitude install cython gcc`):
Download, compile and install for Python 3 and 2.
git clone https://github.com/tompreston/python-lirc.git
cd python-lirc/
make py3
sudo python3 setup.py install
make py2
sudo python setup.py install
Or just install straight from PyPI:
sudo easy_install3 python-lirc
sudo easy_install python-lirc
Configure
=========
You need a valid [lircrc configuration file](http://www.lirc.org/html/configure.html#lircrc_format). For example:
$ cat ~/.lircrc
begin
button = 1 # what button is pressed on the remote
prog = myprogram # program to handle this command
config = one, horse # configs are given to program as list
end
begin
button = 2
prog = myprogram
config = two
end
Use
===
$ python3
>>> import lirc
>>> sockid = lirc.init("myprogram")
>>> lirc.nextcode() # press 1 on remote after this
['one', 'horse']
>>> lirc.deinit()
Load custom configurations with:
>>> sockid = lirc.init("myprogram", "mylircrc")
>>> lirc.load_config_file("another-config-file") # subsequent configs
Set whether nextcode blocks or not with:
>>> sockid = lirc.init("myprogram", blocking=False)
>>> lirc.set_blocking(True, sockid) # or thisChange Log
==========
v1.1
------
- Tidied up project structure.
- init now tries to use config at ~/.lircrc and then /etc/lirc/lircrc.
===========
LIRC extension written in Cython for Python 3 (and 2).
[PyPI](https://pypi.python.org/pypi/python-lirc/)
Install
=======
You'll need to have [lirc configured](http://www.lirc.org/html/configure.html)
and you may need to install cython (`aptitude install cython gcc`):
Download, compile and install for Python 3 and 2.
git clone https://github.com/tompreston/python-lirc.git
cd python-lirc/
make py3
sudo python3 setup.py install
make py2
sudo python setup.py install
Or just install straight from PyPI:
sudo easy_install3 python-lirc
sudo easy_install python-lirc
Configure
=========
You need a valid [lircrc configuration file](http://www.lirc.org/html/configure.html#lircrc_format). For example:
$ cat ~/.lircrc
begin
button = 1 # what button is pressed on the remote
prog = myprogram # program to handle this command
config = one, horse # configs are given to program as list
end
begin
button = 2
prog = myprogram
config = two
end
Use
===
$ python3
>>> import lirc
>>> sockid = lirc.init("myprogram")
>>> lirc.nextcode() # press 1 on remote after this
['one', 'horse']
>>> lirc.deinit()
Load custom configurations with:
>>> sockid = lirc.init("myprogram", "mylircrc")
>>> lirc.load_config_file("another-config-file") # subsequent configs
Set whether nextcode blocks or not with:
>>> sockid = lirc.init("myprogram", blocking=False)
>>> lirc.set_blocking(True, sockid) # or thisChange Log
==========
v1.1
------
- Tidied up project structure.
- init now tries to use config at ~/.lircrc and then /etc/lirc/lircrc.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-lirc-1.1.tar.gz
(25.5 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python-lirc-1.1.tar.gz.
File metadata
- Download URL: python-lirc-1.1.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c964c47e5007d1261b06cb466720f6c25380d6ba659b64015010df7fc414890
|
|
| MD5 |
26b2248d152cd9be44cc9d2493e89ef7
|
|
| BLAKE2b-256 |
9b07e7cda4a9f0502e04c08f29aaa6129a6ee6a5b7280af222904803b8fb9528
|
File details
Details for the file python-lirc-1.1.linux-x86_64.tar.gz.
File metadata
- Download URL: python-lirc-1.1.linux-x86_64.tar.gz
- Upload date:
- Size: 60.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afcfb9290e196a66888488ea934b6fece5384a35dc62c9f44e2cc8ed27db4193
|
|
| MD5 |
4552ec67acbb2f5330d8f64d424302e8
|
|
| BLAKE2b-256 |
ae296df23cd01eb10a40c7951351e721273cbc85468dda93609919f5904ad9d1
|
File details
Details for the file python-lirc-1.1.linux-armv6l.tar.gz.
File metadata
- Download URL: python-lirc-1.1.linux-armv6l.tar.gz
- Upload date:
- Size: 49.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b03fc525343b18a061c1010a631a2bce6372cf85dc2078f34ce9829205cc2e8
|
|
| MD5 |
6799c5bff1ee8bead3ec9b17515f84e1
|
|
| BLAKE2b-256 |
378a1390929f89fd4f65b1cdc41926410eb2443c24f2dd320e488922952c4121
|