I\'d like开发者_开发技巧 to get a list of files that apply to a regex that i have. I guess i should use os.walk, but how can i use it with regex?
I\'ve written the following in TextWrangler: directory = raw_input(\"See contents of: \") for root, dirs, files in os.walk(direct开发者_StackOverflow中文版ory):
I have a script to report me about all files, in a dir开发者_如何学JAVAectory, so that users will be required to erase them (it\'s a really badly managed cluster, w/o real superuser).
I want to quickly bzip2 compress several hundred gigabytes of data using my 8 core , 16 GB ram workstation.
I\'m trying to get simple code working, unfortunately I\'m a python beginner. My script should return a list of files that doesn\'t match a pattern, more information here :
I needed to find the number of files in a folder on the system. This is what i used: file_count = sum((len(f) for _, _, f in os.walk(\'path\')))
I have a piece of code which I\'m using to search for the executables of game files and returning the directories.I would really like to get some sort of progress indicator as to how far along os.walk
Hey all, this is my first time recently trying to get into the file and os part of Python. I am trying to search a directory then find all sub directories. If the directory has no folders, add all the