Scanning a file

Peter Otten __peter__ at web.de
Sun Oct 30 03:53:09 EST 2005


David Rasmussen wrote:

> None of the solutions presented in this thread is nearly as fast as the
> 
> print file("filename", "rb").read().count("\x00\x00\x01\x00")
 
Have you already timed Scott David Daniels' approach with a /large/
blocksize? It looks promising.

Peter



More information about the Python-list mailing list