2012-09-15 18:25:25 +03:00
|
|
|
from PyQt4.QtCore import *
|
|
|
|
from PyQt4.QtGui import *
|
|
|
|
import subprocess
|
|
|
|
from sextante.core.SextanteLog import SextanteLog
|
|
|
|
from sextante.core.SextanteConfig import SextanteConfig
|
|
|
|
|
|
|
|
class LasToolsUtils():
|
|
|
|
|
|
|
|
LASTOOLS_FOLDER = "LASTOOLS_FOLDER"
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def LasToolsPath():
|
|
|
|
folder = SextanteConfig.getSetting(LasToolsUtils.LASTOOLS_FOLDER)
|
|
|
|
if folder == None:
|
|
|
|
folder =""
|
|
|
|
|
|
|
|
return folder
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def runLasTools(commands, progress):
|
|
|
|
loglines = []
|
|
|
|
loglines.append("LasTools execution console output")
|
|
|
|
commandline = " ".join(commands)
|
|
|
|
proc = subprocess.Popen(commandline, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,stderr=subprocess.STDOUT, universal_newlines=False).stdout
|
|
|
|
for line in iter(proc.readline, ""):
|
|
|
|
loglines.append(line)
|
2012-08-04 19:48:25 +02:00
|
|
|
SextanteLog.addToLog(SextanteLog.LOG_INFO, loglines)
|