![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
chenwei19870313
这个作者很懒,什么都没留下…
展开
-
用python批量删除含有相同字符的文件
如果想删除一个文件夹以及其次级文件夹下的含有相同字符的文件。 如果我想删除example文件夹下所有含有dest字符的文件,则可有下面的代码:import sys#currDir = sys.path[0]currDir = '~/example'import osdef removeFile(dir,delete_string): if os.path.isdir(dir):原创 2017-09-05 22:21:51 · 1620 阅读 · 0 评论 -
matplotlib 参数定制
用matplotlib画图有一段时间了,这次把一些自己的心得体会做个总结:1.如何在python脚本和python shell 动态修改matplotlib画图的参数。matplotlib.rcParams: 存储所有rc设置的类似字典的变量。import matplotlib as mplmpl.rcParams['lines.linewidth'] = 2mpl.rcPara翻译 2016-09-14 20:15:58 · 1130 阅读 · 1 评论