JoeCroqueta

Python Snippets

Apr 4th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. # Recorrer filesystem
  2.  
  3. import os
  4. for dirname, dirnames, filenames in os.walk('.'):
  5.     for subdirname in dirnames:
  6.         print os.path.join(dirname, subdirname)
  7.     for filename in filenames:
  8.         print os.path.join(dirname, filename)
Advertisement
Add Comment
Please, Sign In to add comment