volaya aa60bfecb2 [processing] New system for handling SAGA versions
This commit sets a different way of handling SAGA versions and a new way of checking saga installations

This is done to fix the messy situation that SAGA causes due to its API changing in each release.
2015-01-15 10:27:18 +01:00

25 lines
604 B
Python

import os
import subprocess
def convertUiFile(f):
command = ["pyuic4.bat", f, "-o", "ui_" + os.path.splitext(f)[0] + ".py"]
proc = subprocess.Popen(
command,
shell=True,
stdout=subprocess.PIPE,
stdin=open(os.devnull),
stderr=subprocess.STDOUT,
universal_newlines=True,
).stdout
lines = []
for line in iter(proc.readline, ''):
pass
if __name__ == '__main__':
folder = "."
for descriptionFile in os.listdir(folder):
if descriptionFile.endswith('ui'):
convertUiFile(descriptionFile)