Recorrer un sistema de ficheros


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import os
  2.  
  3. def callback(arg,directory,files):
  4. for f in files:
  5. print os.path.join(directory,f),repr(arg)
  6.  
  7.  
  8. os.path.walk(".",callback,"mensaje")

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.