bahtiyarsenoglu
07/12/2006, 09:51
Parametre olarak gönderilen klasör ve bu klasöre ait alt klasördeki dosyaları
ağaç şeklinde gösteren minik bir fonksiyon:
import os
def fnc(klasor):
for root, dirs, files in os.walk(klasor):
print root
for x in files:
print ' '.rjust(len(root),' '),x
ağaç şeklinde gösteren minik bir fonksiyon:
import os
def fnc(klasor):
for root, dirs, files in os.walk(klasor):
print root
for x in files:
print ' '.rjust(len(root),' '),x