En Tue, 30 Oct 2007 16:38:12 -0300, <[EMAIL PROTECTED]> escribió: > On Oct 30, 1:31 pm, [EMAIL PROTECTED] wrote: >> suppose i have imported two modules foo and bar with >> foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar") >> respectively. > > I'm confused. What is the benefit of importing this way in the first > place? Everything I've read has always been either of the following > (or a variant thereof): > > import foo > > or > > from foo import bar
They're different things. The PyImport_XXX stuff are C functions used in C code - usually inside an application *embedding* Python. The latter is plain old Python code. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list