Great, that was the answer I was looking for, thank you. I'll respond with
how well it works.
On Thu, Apr 10, 2008 at 12:16 AM, Gabriel Genellina <[EMAIL PROTECTED]>
wrote:
> En Wed, 09 Apr 2008 13:31:22 -0300, Patrick Stinson
> <[EMAIL PROTECTED]> escribió:
>
> > Well, I eventually want to add a
En Wed, 09 Apr 2008 13:31:22 -0300, Patrick Stinson
<[EMAIL PROTECTED]> escribió:
> Well, I eventually want to add an import hook, but for now I'd rather
> just
> get the import statement working normally again.
> I have embedded python as a scripting engine in my application. To do
> this,
Well, I eventually want to add an import hook, but for now I'd rather just
get the import statement working normally again.
I have embedded python as a scripting engine in my application. To do this,
I create a new empty module, run the script text using PyRun_String()
passing the module's __dict__
En Tue, 08 Apr 2008 22:01:18 -0300, Patrick Stinson
<[EMAIL PROTECTED]> escribió:
> I'm creating a module with PyModule_New(), and running a string buffer as
> the module's text using PyRun_String and passing the module's __dict__ to
> locals and globals.
Why? Do you want to fake what import do
I'm creating a module with PyModule_New(), and running a string buffer as
the module's text using PyRun_String and passing the module's __dict__ to
locals and globals. I'm having a problem using the import statement from
within PyRun_String(). It complains about "__import__ not found", which
after