29 from threading
import Thread
30 from classes
import settings, info
31 from classes.logger
import log
50 port = s.get(
"debug-port")
51 debug_enabled = s.get(
"debug-mode")
54 openshot.ZmqLogger.Instance().Connection(
"tcp://*:%s" % port)
57 openshot.ZmqLogger.Instance().Path(os.path.join(info.USER_PATH,
'libopenshot.log'))
60 openshot.ZmqLogger.Instance().Enable(debug_enabled)
63 context = zmq.Context()
64 socket = context.socket(zmq.SUB)
65 socket.setsockopt_string(zmq.SUBSCRIBE,
'')
68 poller.register(socket, zmq.POLLIN)
70 log.info(
"Connecting to libopenshot with debug port: %s" % port)
71 socket.connect (
"tcp://localhost:%s" % port)
77 socks = dict(poller.poll(1000))
79 if socks.get(socket) == zmq.POLLIN:
80 msg = socket.recv(zmq.NOBLOCK)
84 log.info(msg.strip().decode(
'UTF-8'))
def get_settings
Get the current QApplication's settings instance.