纯蟒蛇方案的实现

lirconian的Python项目详细描述


这是lirc^{tt1}的一个新的独立实现$ 程序。它提供了一个python api和一个命令行接口。这个 命令行界面与 irsend。相反,它被组织为一个带有子命令的程序。

与irsend还有一些其他的细微差别:

  • 子命令已重命名,并且必须是小写,
  • send once已重命名为send;只接受一个命令 (irsend需要几个),
  • 不带参数的发送停止(重命名为stop)使用远程和 来自上一个send start命令的命令(仅限api;不来自 命令行),
  • list已被两个子命令remotes(listing)替换 和commands,列出给定遥控器中的命令,
  • 不需要为某些命令提供伪空参数,
  • 要发送的--count参数是子命令的参数。
  • 命令中的代码(以前为“列出远程”)将被禁止,除非 -c已给出,
  • 端口号必须用--port-p)参数给定; hostip:portnumber无法识别,
  • 详细选项--verbose-v);回送所有与 LIRC服务器,
  • 使用--timeout-t)选项可选择超时,
  • 更好的错误消息

它只依赖于标准的python库。

python2和python3都受支持。 这完全取决于标准 python库。 (最小版本分别为2.7和3.2; 但是,这还没有经过测试。)

对于gui-lirc客户机,请查看 IrScrutinizer。 对于Java版本,请查看 JavaLircClient

用法:

usage: lirconian [-h] [-a host] [-d path] [-p port] [-t s] [-V] [-v]
           sub-commands ...

Program to send IR codes and commands to a Lirc server.

positional arguments:
  sub-commands
send                Send one command
start               Start sending one command until stopped
stop                Stop sending the command from send-start
remotes             Inquire the list of remotes
commands            Inquire the list of commands in a remote
input-log           Set input logging
driver-option       Set driver option
simulate            Fake the reception of IR signals
transmitters        Set transmitters
version             Inquire version of the Lirc server. (Use "--version"
            for the version of this program.)

optional arguments:
  -h, --help            show this help message and exit
  -a host, --address host
            IP name or address of lircd host. Takes preference
            over --device.
  -d path, --device path
            Path name of the lircd socket
  -p port, --port port  Port of lircd, default 8765
  -t s, --timeout s     Timeout in seconds
  -V, --version         Display version information for this program
  -v, --verbose         Have the communication with the Lirc server echoed

不同于“python bindings for lirc”

当前的lirc版本包含“Python bindings”。 它“需要安装lirc,包括头文件”。它不纯净 python,需要安装一个c模块。因此,它的用途主要是 允许使用python环境中的lirc程序。

相反,这里提供的程序和api是纯python。它运行 在每个支持python的主机上,不管lirc是否存在。 (可能的异常(取决于python实现)是 Unix域套接字版本。)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Intellij新项目JDK不可用   JAVA静态块执行了多少次?   java通过JCheckBox更改文本字段输入的字体颜色   java在星期几文本字段中输入值   java RichFaces 4.2日历。如何通过JavaScript设置日历的输入字段?   java在javafx中注册鼠标处理程序,但处理程序不是内联的   java将jchararray分配给常量unsigned char   在安卓4.4中注意到java奇怪的圆形浮动动作按钮吗?   java中用于解决8个难题的合适的树类是什么   为什么Java在我的Linux服务器上使用了如此多的内存?   java从多个推荐列表中提取顶级推荐   “426写入网络流失败。”尝试使用Java的URL类连接到FTP站点时收到   java如何在没有Gradle的情况下使用IntelliJ打开项目?   java如何在线程完成后使For循环继续?   java使用定制jackson ObjectMapper定制Spring引导序列化过程   java NativeActivity不会显示在屏幕上   如何使用Java中的EditorConfig在IntelliJ IDEA中关闭rightparen自己的行?   java从字符串中删除字母数字单词   Intellij IDEA 13.1中的maven Java编译错误