Listar directorio


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

Hay que tabular la parte de dentro del for (aquí en la web no puedo)


Copy this code and paste it in your HTML
  1. import os
  2. import os.path
  3.  
  4. # Listar entradas y meterlas en "files"
  5. files = os.listdir()
  6. for file in files:
  7.  
  8. # Si es un directorio
  9. if (os.path.isdir(file)):

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.