[Python-Dev] Importing top-level modules (original) (raw)
Juergen Hermann Juergen Hermann" <j.her@t-online.de
Tue, 16 Apr 2002 23:34:12 +0200
- Previous message: [Python-Dev] timeoutsocket.py
- Next message: [Python-Dev] Importing top-level modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi!
I had a problem yesterday where I wanted to extend a top-level module by a module in a subpackage. I naively named my module the same as the toplevel module, and peer import bit me. I finally had to rename my module for no good reason to get things working.
So my question is: is there an easy way to force a top-level import (adress the top-level namespace), that I overlooked?
If not, what do you think of a
from __top__ import systemmodule
similar to from future ...
An alternative syntax would be "import .systemmodule", but that seems obscure.
Ciao, J=FCrgen
- Previous message: [Python-Dev] timeoutsocket.py
- Next message: [Python-Dev] Importing top-level modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]