4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: The Python interface has an empty entry in sys.path.
12 Solution: Filter out the empty entry. (idea from James Vega)
13 Files: src/if_python.c
16 *** ../vim-7.2.044/src/if_python.c Thu Jul 24 16:24:48 2008
17 --- src/if_python.c Thu Nov 20 11:03:53 2008
24 + /* Remove the element from sys.path that was added because of our
25 + * argv[0] value in PythonMod_Init(). Previously we used an empty
26 + * string, but dependinding on the OS we then get an empty entry or
27 + * the current directory in sys.path. */
28 + PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)");
30 /* the first python thread is vim's, release the lock */
38 ! static char *(argv[2]) = {"", NULL};
41 BufferType.ob_type = &PyType_Type;
46 ! /* The special value is removed from sys.path in Python_Init(). */
47 ! static char *(argv[2]) = {"/must>not&exist/foo", NULL};
50 BufferType.ob_type = &PyType_Type;
51 *** ../vim-7.2.044/src/version.c Thu Nov 20 10:36:04 2008
52 --- src/version.c Thu Nov 20 10:58:11 2008
56 { /* Add new patch number below this line */
62 press CTRL-ALT-DEL for more information
64 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
65 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
66 \\\ download, build and distribute -- http://www.A-A-P.org ///
67 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///