I am trying to get Vim running with Python (I know nothing about Python).

I have gVim working with a dynamically loaded Perl.

I compile my own 32-bit Vim on Windows 7 64-bit.

D:\>python --version
Python 2.7

D:\>python
Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
on win 32
Type "help", "copyright", "credits" or "license" for more information.
>>>

D:\>which python
d:\python27\python.EXE



C:\OpenSrc\vim>"C:\Program Files\Mercurial\hg.exe" pull
pulling from https://vim.googlecode.com/hg/
searching for changes
adding changesets
adding manifests
adding file changes
added 35 changesets with 77 changes to 39 files
(run 'hg update' to get a working copy)

C:\OpenSrc\vim>"C:\Program Files\Mercurial\hg.exe" update
39 files updated, 0 files merged, 0 files removed, 0 files unresolved



I compile it the same way I compile with Perl:


***

IF NOT DEFINED VIM_PYTHON_VER SET VIM_PYTHON_VER=27
IF NOT DEFINED VIM_PYTHON_DIR SET VIM_PYTHON_DIR=D:\Python27
IF NOT DEFINED VIM_PERL_VER SET VIM_PERL_VER=516
IF NOT DEFINED VIM_PERL_DIR SET VIM_PERL_DIR=C:\Perl

nmake -f Make_mvc.mak debug=no gui=yes cscope=yes OLE=yes FEATURES=HUGE
PYTHON=%VIM_PYTHON_DIR% DYNAMIC_PYTHON=yes PYTHON_VER=%VIM_PYTHON_VER%
PERL=%VIM_PERL_DIR% DYNAMIC_PERL=yes PERL_VER=%VIM_PERL_VER%
XPM=%VIM_XPM_DIR%

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Python requested (version 27) - root dir is "D:\Python27"
Python DLL will be loaded dynamically
Perl requested (version 516) - root dir is "C:\Perl"
Perl DLL will be loaded dynamically

...

  100%   0 seconds remaining
Finished generating code
        if exist gvim.exe.manifest mt.exe -nologo -manifest
gvim.exe.manifest -u
pdateresource:gvim.exe;1
        cl /nologo -DNDEBUG vimrun.c
vimrun.c
        cl /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib
 user32.l
ib ole32.lib advapi32.lib uuid.lib
dosinst.c
        if exist install.exe del install.exe
        ren dosinst.exe install.exe
        cl /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
uninstal.c
        cd xxd
        "C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\nmake.exe" /
NOLOGO -f Make_mvc.mak
        cl /nologo -DWIN32 xxd.c
xxd.c
        cd ..
        cd GvimExt
        "C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\nmake.exe" /
NOLOGO -f Makefile
        cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_X86_=1
 -DWIN32 -
D_WIN32 -W3 -D_WIN32_IE=0x0400 -DWINVER=0x0400 -DFEAT_GETTEXT  -D_MT -MT
gvimext
.cpp
gvimext.cpp
        Rc /r -DWIN32 -D_WIN32 -DWINVER=0x0400   gvimext.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

        link  /INCREMENTAL:NO /NOLOGO -dll -def:gvimext.def
-base:0x1C000000 -ou
t:gvimext.dll gvimext.obj gvimext.res ole32.lib uuid.lib oleaut32.lib
kernel32.l
ib  ws2_32.lib mswsock.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib
winspo
ol.lib shell32.lib comctl32.lib
   Creating library gvimext.lib and object gvimext.exp
        if exist gvimext.dll.manifest mt -nologo -manifest
gvimext.dll.manifest
-outputresource:gvimext.dll;2
        cd ..

***

I don't see any errors listed while compiling.



:ver
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr  6 2015 14:30:21)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-691
Compiled by me@myDomain
Huge version with GUI.  Features included (+) or not (-):
+acl             +clipboard       +cursorshape     +ex_extra
 -hangul_input    +listcmds        +multi_lang      +profile
+smartindent     -tcl             +visual          -xim
+arabic          +cmdline_compl   +dialog_con_gui  +extra_search
 +iconv/dyn       +localmap        -mzscheme        +python/dyn      -sniff
          -tgetent         +visualextra     -xterm_save
+autocmd         +cmdline_hist    +diff            +farsi
+insert_expand   -lua             +netbeans_intg   -python3
+startuptime     -termresponse    +viminfo         +xpm_w32
+balloon_eval    +cmdline_info    +digraphs        +file_in_path
 +jumplist        +menu            +ole             +quickfix
 +statusline      +textobjects     +vreplace
+browse          +comments        -directx         +find_in_path    +keymap
         +mksession       +path_extra      +reltime         -sun_workshop
 +title           +wildignore
++builtin_terms  +conceal         -dnd             +float
+langmap         +modify_fname    +perl/dyn        +rightleft       +syntax
         +toolbar         +wildmenu
+byte_offset     +cryptv          -ebcdic          +folding
+libcall         +mouse           +persistent_undo -ruby
 +tag_binary      +user_commands   +windows
+cindent         +cscope          +emacs_tags      -footer
 +linebreak       +mouseshape      -postscript      +scrollbind
 +tag_old_static  +vertsplit       +writebackup
+clientserver    +cursorbind      +eval            +gettext/dyn
+lispindent      +multi_byte      +printer         +signs
-tag_any_white   +virtualedit     -xfontset
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   -DWINVER=0x0400
-D_WIN32_WINNT=0x0400  /Fo.\ObjGOLYi386/ /Ox /GL -DNDEBUG  /Zl /MT -
DFEAT_OLE -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON
-DDYNAMIC_PYTHON  -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PERL
-DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl516.dll\" -DFEAT_HUGE /Fd.
\ObjGOLYi386/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib
kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib
uuid.lib /machine:i386 /nodefaultlib gdi32.lib version.lib
  winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:i386
/nodefaultlib libcmt.lib oleaut32.lib  user32.lib
 /nodefaultlib:python27.lib     WSock32.lib xpm\x86\lib\libXpm.lib
/PDB:gvim.pdb -debug



:echo has('perl') has('python') has('python3')
1 1 0

:python print 'anything'
E887: Sorry, this command is disabled, the Python's site module could not
be loaded.



I have found only 1 reference to this error in vim_use or vim_dev:

https://groups.google.com/forum/#!searchin/vim_dev/the$20Python$27s$20site$20module$20could$20not$20be$20loaded/vim_dev/d4Iz0vdPJ48/HZzSJ-fVTOcJ

Which is this:

Patch 7.4.380
Problem:    Loading python may cause Vim to exit.
Solution:   Avoid loading the "site" module. (Taro Muraoka)
Files:            src/if_python.c


Does anyone know what I might be doing wrong?

TIA,
David

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui