Uniquely identifying each & every html template

John Gordon gordon at panix.com
Tue Jan 22 11:35:10 EST 2013


In <5dd4babd-716d-4542-ad36-e6a841b73ec3 at googlegroups.com> Ferrous Cranus <nikos.gr33k at gmail.com> writes:

> > If that's the case, then I figure you have about 3 choices:
> > 1) use the file path as your key, instead of requiring a number

> No, i cannot, because it would mess things at a later time on when i for
> example:

> 1. mv name.html othername.html   (document's filename altered)
> 2. mv name.html /subfolder/name.html   (document's filepath altered)

Will the file always reside on the same device?  If so, perhaps you could
use the file inode number as the key.

(That seems fairly brittle though.  For example if the disk crashes and is
restored from a backup, the inodes could easily be different.)

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list