![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python笔记
啊有礼貌
这个作者很懒,什么都没留下…
展开
-
Python多任务执行方式
进程、线程原创 2023-06-25 21:19:48 · 588 阅读 · 0 评论 -
python3 使用os进行文件夹遍历
引入os包,指定文件目录import os# 项目图片文件夹PROJECT_FILE_DIR = os.path.join(workdir, 'static', 'data', 'projectImg')if not os.path.exists(PROJECT_FILE_DIR): os.mkdir(PROJECT_FILE_DIR)遍历所有文件夹 for root, dirs, files in os.walk(PROJECT_FILE_DIR): print("####原创 2021-10-18 10:25:54 · 329 阅读 · 0 评论 -
Python3 使用math.ceil分割任务
1.期望与难点期望:将一个数sum_count分为img_count份难点:最后一份无法均等分割2. 思路1. 每段分割数:sum_count / img_count 向上取整2. 分割i次,每次中使用j进行每个任务的操作3. 当markCount与sum_count想等时,任务执行完毕3. 实现方法import math print("sum_count:", sum_count) print("img_count:", img_count) # 每次分割任务数 seg原创 2021-10-12 14:03:46 · 150 阅读 · 0 评论