def __init__(self, signals, pipe):
     self.pre = __name__ + "." + self.__class__.__name__
     self.logger = getLogger(self.pre)
     super().__init__()
     self.signals = signals
     self.pipe = pipe
     self.loop = True
 def __init__(self, name = "QMultiProcess"):
     self.name = name
     self.pre = self.__class__.__name__ + "." + self.name
     self.logger = getLogger(self.pre)
     super().__init__()
     self.signals = self.Signals()
     print("class, signals:", self.__class__.__name__, self.signals)
     self.front_pipe, self.back_pipe = Pipe() # incoming messages
     self.qt_front_thread = QFrontThread(self.signals, self.front_pipe)
     self.loop = True
     self.listening = False # are we listening something else than just the intercom pipes?
Beispiel #3
0
 def __init__(self, **kwargs):
     # checks that kwargs is consistent with parameter_defs.  Attaches
     # parameters as attributes to self.  This is a mother class: there
     # might be more parameters not defined here from child classes
     parameterInitCheck(Analyzer.parameter_defs,
                        kwargs,
                        self,
                        undefined_ok=True)
     self.pre = self.__class__.__name__
     self.logger = getLogger(self.pre)
     if self.debug or self.verbose:
         self.setDebug()
Beispiel #4
0
    def __init__(self, day, parent=None):
        super().__init__(parent)
        self.signals = TimeLineWidget.Signals()
        self.logger = getLogger(__name__ + "." + self.__class__.__name__)
        self.logger.setLevel(logging.DEBUG)
        self.logger.propagate = False

        self.setFSTimeLimits(None)
        self.setBlockTimeLimits(None)
        self.setSelTimeLimits(None)

        self.makeTools()
        self.setDay(day)
        self.setupUi()
Beispiel #5
0
 def setLogLevel(self, level):
     getLogger(self.logger, level=level)
@date    2018
@version 0.12.2 
@brief   
"""

from multiprocessing import Process, Pipe
import select
import errno
import time
import sys
import logging

from PySide2 import QtCore, QtWidgets
from valkka.live.tools import getLogger, setLogger

logger = getLogger(__name__)


class MessageObject:

    def __init__(self, command, **kwargs):
        self.command = command
        self.kwargs = kwargs

    def __str__(self):
        return "<MessageObject: %s: %s>" % (self.command, self.kwargs)

    def __getitem__(self, key):
        return self.kwargs[key]