wasm-demo/demo/ermis-f/python_m/cur/0946

44 lines
1.4 KiB
Plaintext

From: gmcm at hypernet.com (Gordon McMillan)
Date: Fri, 16 Apr 1999 17:53:20 GMT
Subject: Imperfections in ihooks.py?
In-Reply-To: <m37lrcocba.fsf@atrus.jesus.cam.ac.uk>
References: <m37lrcocba.fsf@atrus.jesus.cam.ac.uk>
Message-ID: <1287837093-4782027@hypernet.com>
Content-Length: 1132
X-UID: 946
[Michael Hudson messes with ihooks and /F points him to Greg's
imputil.py at http://www.lyra.org/greg/small/ ]:
> Ah! Fantastic!
>
> Usual case; I start to think about a problem, ask about it and find
> someone else has solved the problem already.
>
> Not perfection yet though - imputil.py contains these lines:
>
> def _reload_hook(self, module):
> raise SystemError, "reload not yet implemented"
>
> which was one of the things I was moaning about in my post.
Greg is being bad. First, that page hasn't been updated with the link
to my installer (www.mcmillan-inc.com/install.html), and his
imputil.py doesn't have my patch. Said patch doesn't implement
reload, but it does at least determine whether the reload request is
for a module under the hook's control. If not, it passes the request
on.
I looked at what it would take to implement reload. It didn't look
_that_ bad. However, for my purposes (serving modules from an
archive) it just didn't make much sense. I mean, we're talking about
an alternative to freeze after all...
Nits aside, imputil.py is a truly outstanding piece of code.
- Gordon