The question is in sorting through the sheet of files for further processing.
### import os import sys from subprocess import Popen # path = "d:/test" def dir_ask (): print ("path:",'\n') direc = input(dir) if direc == "d:/test": print("normal") else: os.chdir(path) print ("incorrect") print ("repaired") print(path) return # def file_list(): list = os.listdir(path) print (list) return list # def get_atr(): cmd = 'exiftool.exe -k -a -u -g1 -w txt' i = 0 for i in list: i = i + 1 p = subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell = true) pr = str(p.stdout.readlines()) print (pr) return # dir_ask() file_list() get_atr() I am trying to set the path of the file folder, this is + I ask to get a list of files, + I am trying to apply the launch of the COMMAND LINE with a call to the PARTY program, for EVERY of the files in the LIST. Here the application of a third-party program to the elements in the list does not occur. The compiler swears at the syntax error of the LIST description.
get_atrprocedure will thelistbeget_atrif it is a reserved word and such variable is local to thefile_listprocedure? - whintu