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.

  • one
    Why not use PIL (Pillow for Python 3) ? - MaxU
  • Describe in words what you expected the code should do and what happens instead. Do not use broken code as a task specification. The minimum reproducible example is jfs
  • 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. - Eugene_Venev
  • where in the get_atr procedure will the list be get_atr if it is a reserved word and such variable is local to the file_list procedure? - whintu

0