From: Oti <oh...@ya...> - 2002-02-14 23:06:23
|
Hello Tom, heavily guessing (I did not try your code)... Guess #1: Maybe you use another CPython version (different from 2.1) Guess #2: Try renaming the parameters like this (since globals/locals are functions you might get a sort of name clash): def import_hook(name, globaldict=None, localdict=None, fromlist=None): return original_import(name, globaldict, localdict, fromlist) instead of your version below. I faintly remember a very similar problem go away using different parameter names. Lucky if this solves your problem, but no guarantee at all ! Best wishes, Oti. [ Russo, Tom ] <snipped > > def import_hook(name, globals=None, locals=None, fromlist=None): > return original_import(name, globals, locals, fromlist) # > this is where the error occurs __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com |