![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
小太阳,乐向上
越努力,越幸运!
展开
-
Python汇总当前目录下文件夹中的文件到新的文件夹
不常用的小功能,随便记录一下(勿喷),Python汇总当前目录下文件夹中的文件到新的文件夹,并且以原文件夹名称+原文件更改名称# coding:utf-8import osimport shutilbase_path = os.getcwd()new_folder = '汇总目录'def get_folder(dir): folder = [] for root, dirs, files in os.walk(dir): folder = dirs原创 2021-12-07 17:40:26 · 296 阅读 · 0 评论 -
python线程池ThreadPoolExecutor使用、打印返回结果
概述通常,在写任务调度的时候,难免遇到使用多线程、多进程、线程池、进程池的场景。下边以ThreadPoolExecutor线程池为例,记录一下使用方法,其他类似,废话不多说,直接看代码# -*- coding:utf-8 -*-import timeimport randomfrom concurrent.futures import ThreadPoolExecutor, as_com...原创 2020-03-25 22:59:38 · 5780 阅读 · 0 评论 -
python3 + Gooey快速开发GUI应用程序
python3 + Gooey快速开发GUI应用程序说明Gooey 是一个 Python GUI 程序开发框架,基于 wxPython GUI 库,其使用方法类似于 Python 内置 CLI 开发库 argparse,用一行代码即可快速将控制台程序转换为GUI应用程序。安装本文测试使用python 3.6.6 版本(python2请自行测试)pip install Gooey# 或者...原创 2019-12-17 19:24:50 · 12895 阅读 · 2 评论