GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing lirc.org — LIRC libraries: ircat.py
AllClassesFilesFunctionsVariablesTypedefsEnumerationsMacrosModulesPages
ircat.py 1 #!/usr/bin/env python3
2
3 '''
4 Reference python implementation of ircat(1)
5 Run using python3 ircat.py [socket_path [lircrc path]]
6 '''
7
8 import sys
9
10 import lirc
11
12 if len(sys.argv) >= 5 or len(sys.argv) < 2:
13 sys.stderr.write("Usage: ircat.py program [lircrc path [socket path]]\n")
14 sys.exit(1)
15 socket_path = sys.argv[3] if len(sys.argv) == 4 else None
16 lircrc_path = sys.argv[2] if len(sys.argv) >= 3 else None
17 program = sys.argv[1]
18
19 with lirc.LircdConnection(program, lircrc_path, socket_path) as conn:
20 while True:
21 print(conn.readline())
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |