searching and processing particular directory and files in python -


I have the following files in my current directory: Project 1, Project 5, Junk, Temporary and Personal < P> I would like to run through sub-directories at this level. For directories other than junk, temporary and personal, I would like to open and process those special files which say that for projects in Project.C

  'OS' ('.') . () [1]: If the DIR! = 'Junk' or Dior! = 'Temporary' or Dior! = 'Individual': Print Dyes Print "Relevant \ n" # file = open (project // project.c) # Process   

related file

This is a method:

  import glob ignoreDirs = ['junk', 'temporary', ' Personal '] in x glob.glob (' * '): if (os.path .isdir (x) == false): If (X in unseen DIS) continue: Continue # ... the process of working here ...    

Comments