Kent Johnson wrote:
Is os.popen("find") faster or slower than os.path.walk to find file pattern
in the

The general answer to "is find faster than os.[path.]walk faster" is "it depends." Find is optimized, compiled, and fast at what it does. However, what it does is somewhat limited. If you want to descend a filesystem doing anything complex along the way, it might be better to walk it from inside Python (or Perl or whatever) than to hook find up to other shell utilities or to create a pipe out from Python to find and back again.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to