''' Created on 10 apr 2020 @author: Emanuele Trabattoni ''' import os,glob import subprocess #genera i file di traduzionae da inserire nel software a runtime if __name__ == '__main__': tsfiles = glob.glob("..\\spex\\userInterface\\resources\\translations\\*.qt.ts") print(os.getcwd()) for ts in tsfiles: tso = "..\\spex\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(ts)[1]))[0].split(".")[0]+".qm" subprocess.run(f'C:\\Qt\\5.12.2\\mingw73_64\\bin\\lrelease.exe {ts} -qm {tso}') os.chdir("..\\spex\\userInterface") pass