示例#1
0
 def __init__(self):
     QThread.__init__(self)
     self.process = QProcess()
     self.cmd = None
     self.process.readyReadStandardOutput.connect(self.readOutput)
     self.process.readyReadStandardError.connect(self.readErrors)
     self.process.finished.connect(self.fini)
 def __init__(self, UserKeys, filePaths):
     QThread.__init__(self)
     self.userkey = str(UserKeys)
     self.filepath = str(filePaths)
     self.verifySig = None
     self.sig = hmac.new(self.userkey, '', hashlib.sha256)
     self.head = ''
    def __init__(self):
        QThread.__init__(self)

        self.warnedDevices=[]

        self.instaladorRunning="/tmp/instalador-running" 
        #"/tmp/instaladornano-running" 
####
# HARDWARE INITIAL DEFINITIONS - IvMan work
####
        global lshal
        lshal=getoutput("lshal").rsplit('\n') #Guardem l'estat actual de Hardware
        self.bus = dbus.SystemBus()
        self.hal_manager_obj = self.bus.get_object("org.freedesktop.Hal", 
                                                   "/org/freedesktop/Hal/Manager")
        self.hal_manager = dbus.Interface(self.hal_manager_obj,
                                          "org.freedesktop.Hal.Manager")

        # gdl_changed will be invoked when the Global Device List is changed
        # per the hal spec
        self.hal_manager.connect_to_signal("DeviceAdded", 
                         lambda *args: self.gdl_changed("DeviceAdded", *args))
        self.hal_manager.connect_to_signal("DeviceRemoved", 
                         lambda *args: self.gdl_changed("DeviceRemoved", *args))
        self.hal_manager.connect_to_signal("NewCapability", 
                         lambda *args: self.gdl_changed("NewCapability", *args))
 def __init__(self):
     QThread.__init__(self)
     
     #Timer to handle emails
     self.email_timer = QtCore.QTimer()
     self.email_timer.timeout.connect(self.handle_email)
     self.email_timer.start(5000)
示例#5
0
文件: gui.py 项目: donal3000/autopnp
    def __init__(self, ui, parent = None):
        QThread.__init__(self, parent)
        self.ui = ui
        self.mode="linear"
        self.add[str].connect(self.onAdd)
        self.rem[str].connect(self.onRem)
        self.sub1 = rospy.Subscriber("/chromosom/addComponent", String, self.add_callback)
        self.sub2 = rospy.Subscriber("/chromosom/remComponent", String, self.rem_callback)
        self.pub_add = rospy.Publisher('/chromosom/addComponent', String)
        self.pub_rem = rospy.Publisher('/chromosom/remComponent', String)

        ui.btnOpen.clicked.connect(self.open_gripper)
        ui.btnClose.clicked.connect(self.close_gripper)

        ui.btnOn.clicked.connect(self.power_on)
        ui.btnOff.clicked.connect(self.power_off)

        ui.btnToolChange.clicked.connect(self.tool_change)

        ui.rLin.clicked.connect(self.lin)
        ui.rDWA.clicked.connect(self.DWA)
        ui.btnA.clicked.connect(self.A)
        ui.btnB.clicked.connect(self.B)

        self.sss = simple_script_server()
 def __init__(self,fileSharerGui,peerIp,filePath,filename):
     QThread.__init__(self)
     self.fileSharerGui=fileSharerGui
     self.peerIp=peerIp
     self.filePath=filePath
     self.filename=filename
     self.lock=threading.Lock()
示例#7
0
    def __init__(self, location, link, parent=None):
        QThread.__init__(self, parent)

        self.url = link
        self.location = location

        self._run_semaphore = QSemaphore(1)
示例#8
0
 def __init__(self, interval, projectDir, vcs, parent = None):
     """
     Constructor
     
     @param interval new interval in seconds (integer)
     @param projectDir project directory to monitor (string or QString)
     @param vcs reference to the version control object
     @param parent reference to the parent object (QObject)
     """
     QThread.__init__(self, parent)
     self.setObjectName("VcsStatusMonitorThread")
     
     self.setTerminationEnabled(True)
     
     self.projectDir = QString(projectDir)
     self.vcs = vcs
     
     self.interval = interval
     self.autoUpdate = False
     
     self.statusList = QStringList()
     self.reportedStates = {}
     self.shouldUpdate = False
     
     self.monitorMutex = QMutex()
     self.monitorCondition = QWaitCondition()
     self.__stopIt = False
示例#9
0
	def __init__(self, parent, pattern=None, location=None, settings=None):
		"""
		Initializes the class.

		:param parent: Object parent.
		:type parent: QObject
		"""

		LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))

		QThread.__init__(self, parent)

		# --- Setting class attributes. ---
		self.__container = parent

		self.__pattern = None
		self.pattern = pattern
		self.__location = None
		self.location = location
		self.__settings = None
		self.settings = settings

		self.__searchResults = None

		self.__interrupt = False
		self.__lock = QMutex()
示例#10
0
文件: search.py 项目: udgover/modules
 def __init__(self, file):
     QThread.__init__(self)
     EventHandler.__init__(self)
     self.file = file
     self.file.connection(self)
     self.pattern = ""
     self.wild = ""
    def __init__(self, main_window, exp_number, scan_number_list):
        """
        Initialization
        :param main_window:
        :param exp_number:
        :param scan_number_list:
        """
        QThread.__init__(self)

        # check
        assert main_window is not None, 'Main window cannot be None'
        assert isinstance(exp_number, int), 'Experiment number must be an integer.'
        assert isinstance(scan_number_list, list), 'Scan number list must be a list but not %s.' \
                                                   '' % str(type(scan_number_list))

        # set values
        self._mainWindow = main_window
        self._expNumber = exp_number
        self._scanNumberList = scan_number_list

        # connect to the updateTextEdit slot defined in app1.py
        self.peakAddedSignal.connect(self._mainWindow.update_peak_added_info)
        self.peakStatusSignal.connect(self._mainWindow.update_adding_peaks_status)
        self.peakAddedErrorSignal.connect(self._mainWindow.report_peak_addition)

        return
示例#12
0
文件: stdio.py 项目: alepee/dff
 def __init__(self, IOout, fd, sig):
     QThread.__init__(self)
     self.ioOut = IOout
     self.pipe = os.pipe()
     os.close(fd)
     os.dup2(self.pipe[1], fd)   
     self.sig = sig	 
示例#13
0
    def __init__(self, deviceVendor, deviceProduct):

        QThread.__init__(self)

        # Get list of available devices
        devices = map(InputDevice, list_devices())

        # Try to find the desired device
        for device in devices:

            # If multiple devices of same type available,
            # select the first, e.g. phys ".../input0"
            isDesiredDevice = \
                (device.info.vendor == deviceVendor) and \
                (device.info.product == deviceProduct) and \
                (device.phys.endswith('0'))

            if isDesiredDevice:
                self.device = device
                break

        # Get exclusive access to the device
        if self.isConnected():
            print 'Grab keypad input device.'
            self.device.grab()
示例#14
0
 def __init__(self,bssid, client,interface):
     QThread.__init__(self)
     self.bssid      = bssid
     self.client     = client
     self.interface  = interface
     self.status     = False
     self.pkts       = []
示例#15
0
 def __init__(self, parent):
     QThread.__init__(self)
     self.result = None
     self.parent = parent
     self._stopped = False
     self.mutex = QMutex()
     self.filePrefix = None
     self.fileFormat = None
     self.wallColoring = None
     self.cellColoring = None
     self.pointColoring = None
     self.extraDrawing = []
     self.pointSize = None
     self.pointLineColor = None
     self.pointLineThickness = None
     self.ellipsisDraw = None
     self.overSampling = None
     self.wallThickness = None
     self.bgColor = None
     self.loading = False
     self._crop = QRect(0,0,1,1)
     self._pix = None
     self._end_image_plot = False
     self._loading_arguments = {}
     self.retryObject = None
示例#16
0
 def __init__(self):
     QThread.__init__(self)
     self.results = []
     self._cancel = False
     self.locations = []
     self.execute = self.navigate_code
     self.dirty = False
 def __init__(self,tc_service_endpoint, zmq_context):
     QThread.__init__(self)
     
     self.proxy = TemperatureControllerProxy(tc_service_endpoint,zmq_context)
     self.__requested_setpoint1 = None
     self.__requested_setpoint2 = None
     self.__requested_remote_setpoint = None
示例#18
0
 def __init__(self, arraysize, pattern, writePW, gndPW, loop):
     QThread.__init__(self)
     self.arraysize = arraysize              # Memory array size (1,2,3)
     self.pattern = pattern                  # Pattern written into array
     self.writePW = int(writePW)             # Write pulse width
     self.gndPW = int(gndPW)                 # Ground pulse width
     self.loop = int(loop)                   # Loop number
示例#19
0
 def __init__(self, arraysize, pattern, writePW, gndPW, loop):
     QThread.__init__(self)
     self.arraysize = arraysize
     self.pattern = pattern
     self.writePW = int(writePW)
     self.gndPW = int(gndPW)
     self.loop = int(loop)
示例#20
0
	def __init__(self, obj = None, maskSet = None, parent = None):
		QThread.__init__(self, parent)

		self.Obj = obj
		self.Parent = parent
		self.maskSet = maskSet
		self.flag = ''
示例#21
0
文件: login.py 项目: CoralResort/coco
    def __init__(self, login_handler):
        signal = SIGNAL('login vc finish')
        self.mw = login_handler.mw
        self.mw.connect(self.mw, signal, login_handler.login_vc_finish)
        self.signal = signal

        QThread.__init__(self)
示例#22
0
 def __init__(self, parent = None):
     print "We made an *L*worker."
     QThread.__init__(self, parent)
     self.lstate=0
     self.exiting = False
     self.start()
     print "L------About to call the caller."
示例#23
0
	def __init__(self,app):
		"""
		Set up the initial thread for monitoring the directory
		"""
		QThread.__init__(self)
		self.dw = KDirWatch()
		self.app = app
示例#24
0
  def __init__( self, files, needPrj ):
    QThread.__init__( self, QThread.currentThread() )
    self.inFiles = files
    self.needPrj = needPrj

    self.mutex = QMutex()
    self.stopMe = 0
示例#25
0
 def __init__(self, manager):
     QThread.__init__(self)
     self._manager = manager
     #runnable hold a function to call!
     self.runnable = self.collect_data_thread
     #this attribute contains the plugins to download/update
     self.plug = None
示例#26
0
    def __init__(self, tasks, library, urls, avai,
            modified, name, rlock, processed, case):
        """Constructs new worker instance.

        Args:
            tasks: initial tasks queue (it will get tasks from here)
            library: main library part (library[1])
            urls: urls library part (library[3])
            avai: available library part (library[4])
            name: used database name
            rlock: RLock object used to provide thread-safety
                (should be the same for all instances of Bee!)
            processed: processed artists storage (used in ~behaviour mode)
            case: case sensitivity

        """
        QThread.__init__(self)
        self.tasks = tasks
        self.library = library
        self.urls = urls
        self.avai = avai
        self.modified = modified
        self.name = name
        self.rlock = rlock
        self.processed = processed
        self.case = case
        self.start()
示例#27
0
 def __init__(self, parent):
     QThread.__init__(self, parent)
     self.mutex = QMutex()
     self.stopped = False
     self.results = None
     self.nb = None
     self.error_flag = None
示例#28
0
 def __init__(self, parent = None):
     print "We made a worker."
     QThread.__init__(self, parent)
     self.exiting = False
     time.sleep(.1)
     self.start()
     print "About to call the caller."
示例#29
0
 def __init__(self, parent=None):
     """Initialise Linux pseudo terminal
     """
     QThread.__init__(self, parent)
     self.master, self.slave = pty.openpty()
     self.ptyname = os.ttyname(self.slave)
     self.stop = False
示例#30
0
	def __init__(self, queue):
		"""	
		Keyword arguments:
			queue -- a Queue object
		"""
		QThread.__init__(self)
		self._queue = queue
示例#31
0
    def __init__(self, connector, parent=None):
        QThread.__init__(self, parent)

        self.resultRecordQueue = deque()
        self.resultRecordMutex = QMutex()
        self.resultRecordSem = QSemaphore(0)
示例#32
0
 def __init__(self, parent=None):
     QThread.__init__(self, parent)
示例#33
0
 def __init__(self, func_):
     QThread.__init__(self)
     self.func = func_
 def __init__(self, rexarm, state_machine, parent=None):
     QThread.__init__(self, parent=parent)
     self.rexarm = rexarm
     self.sm = state_machine
 def __init__(self, state_machine, parent=None):
     QThread.__init__(self, parent=parent)
     self.sm = state_machine
示例#36
0
 def __init__(self):
     QThread.__init__(self)
     for t in self.threads:
         if not t.isRunning():
             self.threads.remove(t)
     self.threads.append(self)
示例#37
0
 def __init__(self, filename):
     QThread.__init__(self)
     self.filename = filename
示例#38
0
 def __init__(self, socket):
     QThread.__init__(self)
     self.SERV = (SERV_IP, SERV_PORT)
     self.socket = socket
     self.socket.settimeout(1)
示例#39
0
 def __init__(self, socket, name):
     QThread.__init__(self)
     self.SERV = (SERV_IP, SERV_PORT)
     self.socket = socket
     self.name = name
 def __init__(self):
     QThread.__init__(self)
示例#41
0
 def __init__(self):
     QThread.__init__(self)
     self.downloadQueue = Queue()
示例#42
0
 def __init__(self, socket):
     QThread.__init__(self)
     self.SERV = (SERV_IP, SERV_PORT)
     self.socket = socket
示例#43
0
 def __init__(self, queue):
     QThread.__init__(self)
     self._queue = queue
     self._running = False
示例#44
0
 def __init__(self, filenames):
     QThread.__init__(self)
     self.db = None
     self.filenames = filenames
示例#45
0
 def __init__(self):
     QThread.__init__(self)
     self.ide = {}
     self.plugins = []
示例#46
0
    def __init__(self, dev_type='elka', q=None):
        QThread.__init__(self)
        self.exiting = False

        self.dev_type = dev_type
        self.q = q
示例#47
0
 def __init__(self, parent, url):
     QThread.__init__(self, parent)
     self.nodeManager = parent
     self.url = url
示例#48
0
 def __init__(self):
     QThread.__init__(self)
     self.text_valuepath = None
     self.text_folderpath = None
示例#49
0
 def __init__(self):
     QThread.__init__(self)
     self.moveToThread(self)
     self.scanSignal.connect(self.scan)
 def __init__(self, super):
     QThread.__init__(self)
     self.super = super
示例#51
0
 def __init__(self, ontologies):
     QThread.__init__(self)
     self.ontologies = ontologies
示例#52
0
 def __init__(self, parent, url, mimeType, proxy=None):
     QThread.__init__(self, parent)
     self.nodeManager = parent
     self.url = url
     self.mimeType = mimeType
     self.proxy = proxy
示例#53
0
 def __init__(self,args,session):
     QThread.__init__(self)
     self.args    = args
     self.session = session
     self.process = None
示例#54
0
 def __init__(self, ontologies, output, diff, toDel):
     QThread.__init__(self)
     self.ontologies = ontologies
     self.diff = diff
     self.toDel = toDel
     self.output = output
示例#55
0
 def __init__(self, cmd, plugins={}, directory_exec=None):
     QThread.__init__(self)
     self.plugins  = plugins
     self.directory_exec = directory_exec
     self.cmd = cmd
示例#56
0
 def __init__(self, parent=None):
     QThread.__init__(self, parent)
     self.interval = 1
     self._stopRequested = False
示例#57
0
 def __init__(self, daq):
     QThread.__init__(self)
     self.daq = daq
     print('grabDAQ initiated')
示例#58
0
 def __init__(self,cmd):
     QThread.__init__(self)
     self.cmd = cmd
     self.process = None
示例#59
0
 def __init__(self,parentThread,taskFun):
    QThread.__init__(self,parentThread)
    self.task = taskFun
示例#60
0
 def __init__(self,gateway):
     QThread.__init__(self)
     self.gateway = gateway
     self.result = ''