Code checksums at compile time?
Delaney, Timothy
tdelaney at avaya.com
Wed Jun 12 21:15:33 EDT 2002
> From: gat at jpl.nasa.gov [mailto:gat at jpl.nasa.gov]
>
> My question is: is there a way to arrange for the module hash to be
> computed at compile time rather than run time? This would
> seem to be a
> straightforward adaptation of my current code, except that I
> don't know
> how to get a handle on "the module that is currently being
> compiled" (and
> its associated file).
You will need to write an import hook. Look up __import__ in the python
library reference (specifically, 2.3 Built-in Functions).
Tim Delaney
More information about the Python-list
mailing list