diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
commit | 446beb48d9795843c94860d7f62bdc7374aae1dd (patch) | |
tree | 20e64deaab382991a99d6d963e3ae22f13dba2d9 /runtime/doc/if_pyth.txt | |
parent | 1c2b2c12bb6883c2fbae239b99c8113ec546a855 (diff) | |
download | vim-git-446beb48d9795843c94860d7f62bdc7374aae1dd.tar.gz |
Updated runtime files.
Diffstat (limited to 'runtime/doc/if_pyth.txt')
-rw-r--r-- | runtime/doc/if_pyth.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 51f936e35..43c435655 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.3. Last change: 2010 Oct 20 +*if_pyth.txt* For Vim version 7.3. Last change: 2011 May 07 VIM REFERENCE MANUAL by Paul Moore @@ -377,6 +377,18 @@ To work around such problems there are these options: 3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This may crash Vim though. + *has-python* +You can test what Python version is available with: > + if has('python') + echo 'there is Pyton 2.x' + elseif has('python3') + echo 'there is Python 3.x' + endif + +Note however, that when Python 2 and 3 are both available and loaded +dynamically, these has() calls will try to load them. If only one can be +loaded at a time, just checking if Python 2 or 3 are available will prevent +the other one from being available. ============================================================================== vim:tw=78:ts=8:ft=help:norl: |