diff --git a/runtime/python/_vim_python.py b/runtime/python/_vim_python.py
new file mode 100644
--- /dev/null
+++ b/runtime/python/_vim_python.py
@@ -0,0 +1,23 @@
+''' This module holds the python code of the vim-python interface.
+
+The module is imported when the python interface is initialized.
+The module is source-compatible between Python 2 & 3.
+'''
+
+import os
+import vim
+
+_chdir = os.chdir
+
+def chdir(path):
+    '''Notify vim of the need to update the buffers paths.'''
+
+    cwd = os.getcwd()
+    _chdir(path)
+    try:
+        vim.command('cd! ' + path)
+    except vim.error:
+        _chdir(cwd)
+
+os.chdir = chdir
+
diff --git a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -956,6 +956,7 @@
 INDSUBDIR = /indent
 AUTOSUBDIR = /autoload
 PLUGSUBDIR = /plugin
+PYSUBDIR = /python
 FTPLUGSUBDIR = /ftplugin
 LANGSUBDIR = /lang
 COMPSUBDIR = /compiler
@@ -977,6 +978,7 @@
 ### INDSUBLOC	location for indent files
 ### AUTOSUBLOC	location for standard autoload files
 ### PLUGSUBLOC	location for standard plugin files
+### PYSUBLOC	location for standard python files
 ### FTPLUGSUBLOC  location for ftplugin files
 ### LANGSUBLOC	location for language files
 ### COMPSUBLOC	location for compiler files
@@ -998,6 +1000,7 @@
 INDSUBLOC	= $(VIMRTLOC)$(INDSUBDIR)
 AUTOSUBLOC	= $(VIMRTLOC)$(AUTOSUBDIR)
 PLUGSUBLOC	= $(VIMRTLOC)$(PLUGSUBDIR)
+PYSUBLOC	= $(VIMRTLOC)$(PYSUBDIR)
 FTPLUGSUBLOC	= $(VIMRTLOC)$(FTPLUGSUBDIR)
 LANGSUBLOC	= $(VIMRTLOC)$(LANGSUBDIR)
 COMPSUBLOC	= $(VIMRTLOC)$(COMPSUBDIR)
@@ -1102,6 +1105,9 @@
 # Where to copy the standard plugin files from
 PLUGSOURCE = ../runtime/plugin
 
+# Where to copy the standard python files from
+PYTHONSOURCE = ../runtime/python
+
 # Where to copy the ftplugin files from
 FTPLUGSOURCE = ../runtime/ftplugin
 
@@ -1377,6 +1383,7 @@
 DEST_IND = $(DESTDIR)$(INDSUBLOC)
 DEST_AUTO = $(DESTDIR)$(AUTOSUBLOC)
 DEST_PLUG = $(DESTDIR)$(PLUGSUBLOC)
+DEST_PY = $(DESTDIR)$(PYSUBLOC)
 DEST_FTP = $(DESTDIR)$(FTPLUGSUBLOC)
 DEST_LANG = $(DESTDIR)$(LANGSUBLOC)
 DEST_COMP = $(DESTDIR)$(COMPSUBLOC)
@@ -1919,7 +1926,7 @@
 installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
 		$(DEST_HELP) $(DEST_PRINT) $(DEST_COL) $(DEST_SYN) $(DEST_IND) \
 		$(DEST_FTP) $(DEST_AUTO) $(DEST_AUTO)/xml $(DEST_PLUG) \
-		$(DEST_TUTOR) $(DEST_SPELL) $(DEST_COMP)
+		$(DEST_PY) $(DEST_TUTOR) $(DEST_SPELL) $(DEST_COMP)
 	-$(SHELL) ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS)
 	@echo generating help tags
 # Generate the help tags with ":helptags" to handle all languages.
@@ -1989,6 +1996,9 @@
 # install the standard plugin files
 	cd $(PLUGSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_PLUG)
 	cd $(DEST_PLUG); chmod $(HELPMOD) *.vim README.txt
+# install the standard python files
+	cd $(PYTHONSOURCE); $(INSTALL_DATA) *.py $(DEST_PY)
+	cd $(DEST_PY); chmod $(HELPMOD) *.py
 # install the ftplugin files
 	cd $(FTPLUGSOURCE); $(INSTALL_DATA) *.vim README.txt logtalk.dict $(DEST_FTP)
 	cd $(DEST_FTP); chmod $(HELPMOD) *.vim README.txt
@@ -2150,7 +2160,7 @@
 		$(DEST_PRINT) $(DEST_COL) $(DEST_SYN) $(DEST_IND) $(DEST_FTP) \
 		$(DEST_LANG) $(DEST_KMAP) $(DEST_COMP) \
 		$(DEST_MACRO) $(DEST_TOOLS) $(DEST_TUTOR) $(DEST_SPELL) \
-		$(DEST_AUTO) $(DEST_AUTO)/xml $(DEST_PLUG):
+		$(DEST_AUTO) $(DEST_AUTO)/xml $(DEST_PLUG) $(DEST_PY):
 	-$(SHELL) ./mkinstalldirs $@
 	-chmod $(DIRMOD) $@
 
@@ -2301,7 +2311,9 @@
 	-rm -rf $(DEST_FTP)/*.vim $(DEST_FTP)/README.txt
 	-rm -f $(DEST_AUTO)/*.vim $(DEST_AUTO)/README.txt $(DEST_AUTO)/xml/*.vim
 	-rm -f $(DEST_PLUG)/*.vim $(DEST_PLUG)/README.txt
+	-rm -f $(DEST_PY)/*.py
 	-rmdir $(DEST_FTP) $(DEST_AUTO)/xml $(DEST_AUTO) $(DEST_PLUG) $(DEST_RT)
+	-rmdir $(DEST_PY)
 #	This will fail when other Vim versions are installed, no worries.
 	-rmdir $(DEST_VIM)
 
diff --git a/src/if_python.c b/src/if_python.c
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -793,6 +793,16 @@
 	 * the current directory in sys.path. */
 	PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)");
 
+	/* Insert the vim runtime path for python files in sys.path. */
+	if (PyRun_SimpleString("import sys, os;"
+                "rtpath = os.path.join(os.environ['VIMRUNTIME'], 'python');"
+                "sys.path[:0] = [rtpath]"))
+	    goto fail;
+
+        /* Run the python code part of the vim-python interface. */
+	if (PyRun_SimpleString("import _vim_python;"))
+	    goto fail;
+
 	/* lock is created and acquired in PyEval_InitThreads() and thread
 	 * state is created in Py_Initialize()
 	 * there _PyGILState_NoteThreadState() also sets gilcounter to 1
diff --git a/src/if_python3.c b/src/if_python3.c
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -803,6 +803,16 @@
 	 */
 	PyRun_SimpleString("import vim; import sys; sys.path = list(filter(lambda x: not x.endswith('must>not&exist'), sys.path))");
 
+	/* Insert the vim runtime path for python files in sys.path. */
+	if (PyRun_SimpleString("import sys, os;"
+                "rtpath = os.path.join(os.environ['VIMRUNTIME'], 'python');"
+                "sys.path[:0] = [rtpath]"))
+	    goto fail;
+
+        /* Run the python code part of the vim-python interface. */
+	if (PyRun_SimpleString("import _vim_python;"))
+	    goto fail;
+
 	/* lock is created and acquired in PyEval_InitThreads() and thread
 	 * state is created in Py_Initialize()
 	 * there _PyGILState_NoteThreadState() also sets gilcounter to 1
