Python获取文件名的方法性能对比 前言:平常在python中从文件夹中获取文件名的简单方法 os.system('ll /data/') 但是当文件夹中含有巨量文件时,这种方式完全是行不通的: 在/dd目录中生成了近6百万个文件,接下来看看不同方法之间的性能对比 快速生成文件的shell脚本 for i in $(seq 1 1000000);do echo text >>$i.txt;done 1.系统命令 ls -l # 系统命令 ls -l import time imp…
用于科学计算的 Python 发行版: 1.Anaconda https://www.continuum.io/ 公司continuum. 有商业版本. Anaconda is the leading open data science platform powered by Python. The open source version of Anaconda is a high performance distribution of Python and R and include…