This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This snippet shows how to listen for the SIGTERM signal on Unix and execute a | |
simple function open receiving it. | |
To test it out, uncomment the pid code and kill the process with: | |
$ kill -15 pid | |
""" | |
import signal | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
from future.standard_library import install_aliases | |
install_aliases() | |
from urllib.parse import unquote | |
import select, socket | |
import cec | |
config = { | |
'lms_server': ('192.168.1.10', 9090), # IP of your Squeeze Server, and the network control port (usually 9090) |