• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • python遍歷文件夾

    發表于:2007-05-26來源:作者:點擊數: 標簽:
    根據別人的算法用python實現

    #!/usr/bin/python

    from os.path import basename, isdir
    from os import listdir

    def traverse(path, depth=0):
     prefix =  depth* '| ' + '|_'
     if(isdir(path)):
      print prefix, basename(path)
      for item in listdir(path):
       traverse(path+'/'+item, depth+1)
     else:
      print prefix, basename(path)

    if __name__ == '__main__':
     traverse('./')

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>