The evaluation of a Python plugin under OS X sometimes yields the error: "Fatal Python error: PyThreadState_Get: no current thread". It seems that the error occurs only if the plugin uses a builtin package (such as math or datetime) and that the Python code before the import of the package is executed normally.
The problem can be resolved by removing the option "-lpython2.7" from the final linker call which builds the dlvhex2 binary (but I don't know why this solves the problem); the python library has already been linked to libdlvhex2-internalplugins. However, the linker needs to be called manually with the option being removed since I did not manage to prevent the autotools from adding the library also to the final linker call.
Unter Linux everything works well both with Python 2.7 and 3.4. Unter Windows I tested only with Python 3.4 and everything works as well.
The problem was due to mixing up different Python version (OS X native, MacPorts). Make sure that the .a file used for linking correspond to the dylib libraries in the search path.
The evaluation of a Python plugin under OS X sometimes yields the error: "Fatal Python error: PyThreadState_Get: no current thread". It seems that the error occurs only if the plugin uses a builtin package (such as math or datetime) and that the Python code before the import of the package is executed normally.
The problem can be resolved by removing the option "-lpython2.7" from the final linker call which builds the dlvhex2 binary (but I don't know why this solves the problem); the python library has already been linked to libdlvhex2-internalplugins. However, the linker needs to be called manually with the option being removed since I did not manage to prevent the autotools from adding the library also to the final linker call.
Unter Linux everything works well both with Python 2.7 and 3.4. Unter Windows I tested only with Python 3.4 and everything works as well.