Question about Module Loading

If a Python program imported a module, say numpy for example, where in the source is this line interpreted and then handled by import.c ? Thank you in advance!

On Wed, 01 Jun 2011 10:54:13 -0700, Timothy Kadich <tdkadich@gmail.com> wrote:
If a Python program imported a module, say numpy for example, where in the source is this line interpreted and then handled by import.c ?
Your question is not as simple as you think (I think), but I'm guessing you will want to look at Python/ceval.c. -- R. David Murray http://www.bitdance.com

I don't understand what you mean by "TARGET(IMPORT_NAME)". I can't find that string in ceval.c. On 1 June 2011 12:04, Benjamin Peterson <benjamin@python.org> wrote:
If a Python program imported a module, say numpy for example, where in
2011/6/1 Timothy Kadich <tdkadich@gmail.com>: the
source is this line interpreted and then handled by import.c ?
Many different files. Start from TARGET(IMPORT_NAME) in ceval.c.
-- Regards, Benjamin

Nevermind. In 2.6 (what I'm working with) it's "case IMPORT_NAME:" Thank you for letting me know where to start. On 1 June 2011 15:43, Timothy Kadich <tdkadich@gmail.com> wrote:
I don't understand what you mean by "TARGET(IMPORT_NAME)". I can't find that string in ceval.c.
On 1 June 2011 12:04, Benjamin Peterson <benjamin@python.org> wrote:
If a Python program imported a module, say numpy for example, where in
2011/6/1 Timothy Kadich <tdkadich@gmail.com>: the
source is this line interpreted and then handled by import.c ?
Many different files. Start from TARGET(IMPORT_NAME) in ceval.c.
-- Regards, Benjamin
participants (3)
-
Benjamin Peterson
-
R. David Murray
-
Timothy Kadich