
import os
path = r"E:\workspace\nwclient"
fileList = []
for root, dirs, files in os.walk(path):
    if root == r"E:\workspace\nwclient":

        if files:
            for file in files:
                if file.endswith(".py")  :
                    fileList.append(os.path.join(root,file))

os.chdir(path)
fileliststr = "" 
for file in fileList: 
    file = file + "  "
    fileliststr += file

cmd = "pylupdate4 " + fileliststr + "-ts la_zh_CN.ts"

os.system(cmd)
os.system("linguist la_zh_CN.ts")
