|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- import os
- def vedio_file(start_file):
- os.chdir(start_file)
- all_file = os.listdir(os.curdir)
- for each_file in all_file:
- if os.path.splitext(each_file)[1] in ['.mp4','.rmvb','.avi']:
- vedioList.append(os.getcwd() + os.sep + each_file +os.linesep)
- if os.path.isfile(each_file):
- vedio_file(each_file)
- os.chdir(os.pardir)
- start_file = input('请输入待查找的初始目录:')
- vedioList = []
- vedio_file(start_file)
- f = open(os.getcwd() + os.sep + 'vedioList.txt','w')
- f.writelines(vedioList)
- f.close()
复制代码
这是我自己写的,为啥不对啊
我运行小甲鱼的程序也是有问题。。。
|
-
我写的程序
-
小甲鱼的程序
|