summaryrefslogtreecommitdiff
path: root/src/projManagement/Worker.py
diff options
context:
space:
mode:
authorfossee2019-08-29 12:03:11 +0530
committerfossee2019-08-29 12:03:11 +0530
commitfe3bd934634bb2dae1cadf35e7c6d59facbedf66 (patch)
treeab841ad9ca3d56f7eb85cb3650f6608b80656027 /src/projManagement/Worker.py
parentf7567ac99f21fb6c87d60f309f0aa71dee6ae975 (diff)
downloadeSim-fe3bd934634bb2dae1cadf35e7c6d59facbedf66.tar.gz
eSim-fe3bd934634bb2dae1cadf35e7c6d59facbedf66.tar.bz2
eSim-fe3bd934634bb2dae1cadf35e7c6d59facbedf66.zip
adding files
Diffstat (limited to 'src/projManagement/Worker.py')
-rw-r--r--src/projManagement/Worker.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py
new file mode 100644
index 00000000..6befca65
--- /dev/null
+++ b/src/projManagement/Worker.py
@@ -0,0 +1,46 @@
+#===============================================================================
+#
+# FILE: WorkerThread.py
+#
+# USAGE: ---
+#
+# DESCRIPTION: This class open all third party application using QT Thread
+#
+# OPTIONS: ---
+# REQUIREMENTS: ---
+# BUGS: ---
+# NOTES: ---
+# AUTHOR: Fahim Khan, fahim.elex@gmail.com
+# ORGANIZATION: eSim team at FOSSEE, IIT Bombay.
+# CREATED: Tuesday 24 Feb 2015
+# REVISION: ---
+#===============================================================================
+from PyQt4 import QtCore
+import subprocess
+from configuration.Appconfig import Appconfig
+
+class WorkerThread(QtCore.QThread):
+ """
+ This is Thread class use to run the command
+ """
+ def __init__(self,args):
+ QtCore.QThread.__init__(self)
+ self.args = args
+
+
+ def __del__(self):
+ self.wait()
+
+ def run(self):
+ print "Worker Thread Calling Command :",self.args
+ self.call_system(self.args)
+
+ def call_system(self,command):
+ procThread = Appconfig()
+ proc = subprocess.Popen(command.split())
+ procThread.procThread_list.append(proc)
+ procThread.proc_dict[procThread.current_project['ProjectName']].append(proc.pid)
+
+
+
+