+
+def find_executable(exec_name):
+ """find the given executable in $PATH"""
+ paths = os.getenv("PATH").split(':')
+ for p in paths:
+ exec_path = os.path.join(p, exec_name)
+ if os.path.exists(exec_path):
+ return exec_path
+ return None
+
+def process(command):
+ SFI_CMD = find_executable("sfi.py")
+ arguments = QStringList()
+ for c in command:
+ arguments << QString(c)
+ process = QProcess()
+ process.start(SFI_CMD, arguments)
+ process.waitForFinished( 200000 )
+ print process.readAll()
+
+