摘要: 一、背景 在使用subprocess.Popen调用系统命令时,如果配置 close_fds=True ,命令执行耗时会显著加长。 首先,我们看下一个普通的 命令,耗时只需要0.002秒。 然后,subprocess.Popen,配置 ,执行ls命令,耗时需要整整0.06秒(0.002秒的30倍)。 阅读全文
posted @ 2020-04-30 19:18 cnwenf 阅读(2729) 评论(0) 推荐(0)