Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102757 > unrolled thread
| Started by | dieter <dieter@handshake.de> |
|---|---|
| First post | 2016-02-10 08:54 +0100 |
| Last post | 2016-02-10 08:54 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Importing two modules of same name dieter <dieter@handshake.de> - 2016-02-10 08:54 +0100
| From | dieter <dieter@handshake.de> |
|---|---|
| Date | 2016-02-10 08:54 +0100 |
| Subject | Re: Importing two modules of same name |
| Message-ID | <mailman.1.1455090890.22075.python-list@python.org> |
Carl Meyer <carl@oddbird.net> writes: > ... > If you omit the future-import in Python 2.7, `import config` will import > the neighboring app/config.py by default, and there is no way to import > the top-level config.py. There is the "__import__" builtin function which allows to specify the "parent package" indirectly via its "globals" parameter. This way, you can import the "top-level" config (passing an empty "globals").
Back to top | Article view | comp.lang.python
csiph-web