Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- children = [x[0] for x in os.walk(dir)]
- for f in children:
- print f + 'n'
- print str(len(children)) + 'directories found'
- from threading import thread
- import os
- import time
- children = []
- def fine_dirs():
- children = [x[0] for x in os.walk(dir)]
- print str(len(children)) + 'directories found'
- def print_dirs():
- for f in children:
- print f + 'n'
- if __name__ == "__main__":
- Thread(target = find_dirs).start()
- time.sleep(2.0)
- Thread(target = print_dirs).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement