findAllFile
时间: 2023-11-25 11:53:08 浏览: 12
引用中的代码相似,也是定义了一个名为findAllFile的函数,接收一个参数base作为输入。函数使用os模块中的walk函数遍历base目录下的所有文件,并使用yield语句返回每个文件的完整路径。在主程序中调用了findAllFile函数,并判断路径中是否包含"sensor_log_0",如果包含则打印出来。
引用或引用中的任意一个,根据需要选择其中一个函数来使用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [python文件查找](https://blog.csdn.net/qq_41102371/article/details/120156629)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Python 遍历文件夹下的文件](https://blog.csdn.net/leokingszx/article/details/115656924)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [python文件夹批处理操作](https://blog.csdn.net/weixin_39817347/article/details/109972513)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文