Subprocess very slow when calling external egrep and less
问题 I'm trying to build a python script that will allow me dynamic build up on egrep -v attributes and pipe the output into less (or more). The reason why I want to use external egrep+less is because files that I am processing are very large text files (500MB+). Reading them first into a list and processing all natively through Python is very slow. However, when I use os.system or subprocess.call, everything is very slow at the moment I want to exit less output and return back to python code. My