码迷,mamicode.com
首页 > 编程语言 > 详细

python 获取文件下文件个数

时间:2019-01-11 21:19:23      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:imp   name   ber   glob   testcase   pre   print   test   class   

import glob
# path_file_number=glob.glob(‘D:/case/test/testcase/checkdata/*.py‘)#或者指定文件下个数
path_file_number=glob.glob(pathname=‘*.py‘) #获取当前文件夹下个数
print(path_file_number)
print(len(path_file_number))

  

python 获取文件下文件个数

标签:imp   name   ber   glob   testcase   pre   print   test   class   

原文地址:https://www.cnblogs.com/mahaining/p/10257314.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!