preparing call to autoPyLoT from QtPyLoT

This commit is contained in:
Sebastian Wehling-Benatelli 2015-07-09 11:34:41 +02:00
parent 1bee360bbb
commit 120f2743d2
2 changed files with 19 additions and 0 deletions

BIN
icons/sync.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

19
pylot/core/util/thread.py Normal file
View File

@ -0,0 +1,19 @@
import sys
from PySide.QtCore import QThread, Signal
class WorkerThread(QThread):
message = Signal(str)
def __init__(self, func, data, param):
super(WorkerThread, self).__init__()
self.func = func
self.data = data
self.param = param
def run(self):
sys.stdout = self
self.func(self.data, self.param)
def write(self, text):
self.message.emit(text)