469,317 Members | 1,903 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Reference implementation of an import hook


Do you know of a reference implementation of an import hook? I mean a
class, written in Python, that imitates Python's default module loading
behaviour. I mean that I would be able to append the class to
sys.path_hooks, and modules will be imported in the same way they are
currently imported.

I want it so that it would be easy for me to change it, or subclass it,
for my own needs, while preserving its behaviour. (The situation, if you
are interested, is that currently modules are loaded from the network,
which takes a long time, and I want to create a caching mechanism which
will use the local hard-disk.)

Thank you,
Noam Raphael
Jul 18 '05 #1
0 957

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Grant D. Watson | last post: by
reply views Thread by John Roth | last post: by
reply views Thread by Mustafa Thamer | last post: by
97 posts views Thread by Kjetil Torgrim Homme | last post: by
2 posts views Thread by Torsten Mohr | last post: by
5 posts views Thread by Steve Holden | last post: by
7 posts views Thread by Karl Ebener | last post: by
6 posts views Thread by Joel | last post: by
9 posts views Thread by rsoh.woodhouse | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.