On 08.09.2010 22:02:48 b...@moolenaar.net wrote: > > I would opt for the following: > > > > If only one, Python 2.x xor Python 3.x, is configured (and if > > DYNAMIC_PYTHON), then use RTLD_GLOBAL: > > #define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) > > > > If both are configured use without RTLD_GLOBAL: > > #define load_dll(n) dlopen((n),RTLD_LAZY) > > OK, that's a reasonable compromise, should make most things work for > most people. > > Can you please document this in the help? We need to update the section > about the Python 3 support anyway! What differences are there?
There are no differences apart from :py3 <-> :py[thon], and the discussed consequences, and the possible restrictions in python functionality, if both versions are enabled, as discussed in this thread. I had a look at the current documentation. You already mention Python 3. Since there are no other differences this should suffice. With the above compromise I suggest the following as last chapter in if_pyth.txt. ============================================================================== 7. Python 3 *python3* *:py3* *:python3* The |:py3| and |:python3| commands work similar to |:python|. *:py3file* The |:py3file| command works similar to |:pyfile|. Vim can be built in four ways (:version output): 1. No Python support (-python, -python3) 2. Python 2 support only (+python or +python/dyn, -python3) 3. Python 3 support only (-python, +python3 or +python3/dyn) 4. Python 2 and 3 support (+python/dyn, +python3/dyn) You can see that when Python 2 and Python 3 are both supported they must be loaded dynamically. On Linux/Unix systems this can only be done without importing global symbols. In this case python's "import" might fail, if the library expects the symbols to be provided by vim. To work around this 1. either the problematic library, or python in case of standard libraries, must be recompiled to link to the according libpython.so file (--enable-shared in case of python). 2. Or you recompile vim for only one python version. In this case all symbols can be imported into vim. ============================================================================== Regards, Roland -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php