Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- #ret = []
- #for (root, dirs, files) in os.walk('.'):
- # for dir in dirs:
- # if '.' in dir:
- # ret.append(os.path.join(root, dir))
- def find_files(topdir):
- for (root, dirs, files) in os.walk(topdir):
- for file in files:
- path = os.path.join(root, file)
- if os.path.isfile(path):
- yield path
- for file in find_files('.'):
- print(file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement