会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
咸鱼DoYoung
做一条有理想的咸鱼
公告
日历
导航
博客园
首页
新随笔
新文章
联系
订阅
管理
2021年7月15日
python 将目录下所有文件夹的绝对路径写到文件中
摘要: import os dirlist = os.listdir() #打开文件 fo = open("dirs.txt","w") #遍历 for dir in dirlist: #判断如果是文件夹 if os.path.isdir(dir): #写 file.write(str(os.path.ab
阅读全文
posted @ 2021-07-15 23:38 咸鱼Doyoung
阅读(200)
评论(0)
推荐(0)
编辑
Copyright © 2024 咸鱼Doyoung
Powered by .NET 8.0 on Kubernetes