Wiki
Clone wikipymoult / listener
The Listener class
The Listener
class extends the Thread
class and provides a socket
to wich updates can be supplied. The update is supplied as a python
module which first line must be #parsed
. This module will be
imported to the application so the top-level code of the module will
be run.
To supply an update, one has to supply the following command to the
socket : update <path to module>
. The socket listens to port 4242 on
the local machine.
Other commands are also available :
set logpath <path> will set the path for the pymoult.log logfile
set loglevel <n> will set the loglevel. It must be 0 (no log), 1 (only error logs) or 2 (every log)
The listener.py
modules also provides a get_app_listener
function that returns the previously started listener.
Updated