[Import-sig] Another imputil problem
Greg Stein
gstein@lyra.org
Fri, 9 Feb 2001 16:39:58 -0800
Makes sense.
+1
[ damn self-modifying modules... :-) ]
Cheers,
-g
On Fri, Feb 09, 2001 at 10:04:45PM +0100, Thomas Heller wrote:
> This seems to fix the problem:
>
> *** imputil.py~ Thu Sep 28 05:10:32 2000
> --- imputil.py Fri Feb 09 21:02:53 2001
> ***************
> *** 280,286 ****
> if not is_module:
> exec code in module.__dict__
>
> ! return module
>
> def _load_tail(self, m, parts):
> """Import the rest of the modules, down from the top-level module.
> --- 280,287 ----
> if not is_module:
> exec code in module.__dict__
>
> ! # fetch from sys.modules instead of returning module directly.
> ! return sys.modules[fqname]
>
> def _load_tail(self, m, parts):
> """Import the rest of the modules, down from the top-level module.
>
>
>
> _______________________________________________
> Import-sig mailing list
> Import-sig@python.org
> http://mail.python.org/mailman/listinfo/import-sig
--
Greg Stein, http://www.lyra.org/