Using filepath method to identify an .html page

Michael Torrie torriem at gmail.com
Tue Jan 22 19:49:47 CET 2013


On 01/22/2013 11:26 AM, Ferrous Cranus wrote:
> which yields:
> $ perl testMD5.pl 
> /index.html: 1066
> /about/time.html: 1547

Well do it the same with in python then.  Just read the docs on the
hashlib so you know what kind of object it returns and how to call
methods on that object to return a big number that you can then do %
10000 on it.  Note that your perl code is guaranteed to have collisions
in the final number generated.

If you're comfortable with perl, maybe you should use it rather than
fight a language that you are not comfortable with and not understanding.



More information about the Python-list mailing list