On Aug 12, 12:44 pm, Michael Kohout wrote:
> Hello all-
>
> I've got a multithreaded server-based application that I'd like to use
> python to provide plugin support for. At execution time I would like
> each call to the plugin/plugins to have their own implementation of
> these extension methods
"Vertilka" <[EMAIL PROTECTED]> wrote:
> I saw several functions: PyRun_AnyFileExFlags, PyRun_SimpleFileExFlags,
> PyRun_FileExFlags.
>
> Questions:
> 1) Which one should i use in order to achieve what i need ?
PyRun_SimpleFile or PyRun_SimpleString should be good enough. Using
SimpleString is mo
Torsten Bronger wrote:
> Hallöchen!
>
> Thomas Heller <[EMAIL PROTECTED]> writes:
>
>> Torsten Bronger wrote:
>>
>>> [...] However, is there a way to avoid this dummy "pp3" module
>>> and add the C++ functions directy to the main namespace in the
>>> Python script?
>> Yes. You can import __buil
Hallöchen!
Thomas Heller <[EMAIL PROTECTED]> writes:
> Torsten Bronger wrote:
>
>> [...] However, is there a way to avoid this dummy "pp3" module
>> and add the C++ functions directy to the main namespace in the
>> Python script?
>
> Yes. You can import __builtin__, and add methods to it. This
Torsten Bronger wrote:
> Hallöchen!
>
> I'd like to script C++ funtions by an embedded Python interpreter.
> So far, my C++ main() function contains:
>
> Py_Initialize();
> Py_InitModule("pp3", PythonMethods);
> PyRun_SimpleString("from pp3 import *");
> PyRun_AnyFile(stdin, NULL);
> Py
Richard Townsend wrote:
> In the "Extending and Embedding" part of the Python documentation: section
> 5.4 "Extending Embedded Python" - it describes how to use a Python
> extension module from Python that is embedded in a C application.
>
> Is it safe to call Py_InitModule() more than once in the