1
 prules=subprocess.check_output("perl ruleFinder.pl "+datasetfile+" "+myrulepath, shell=True)##call a different program to produce a list of rules that predict contact

I am using this code to call another program and get the data produced from this program. Using this is takes about a minute to finish. Is there a quicker more efficient function I could use?

4

1 回答 1

4

subprocess.check_output只需启动另一个进程并等待它完成。这需要一分钟的时间,但时间并没有花在执行subprocess.check_output上。时间花在执行另一个进程上。加快速度的唯一方法是加快其他过程。

于 2013-04-30T15:20:01.707 回答