|
3 | 3 | helpname: 'if_pyth'
|
4 | 4 | ---
|
5 | 5 | <div id='vimCodeElement'>
|
6 |
| -<a class="Constant" href="if_pyth.html" name="if_pyth.txt">if_pyth.txt</a> For <span class="Identifier">Vim version 9.1.</span> Last change: 2023 Oct 25<br> |
| 6 | +<a class="Constant" href="if_pyth.html" name="if_pyth.txt">if_pyth.txt</a> For <span class="Identifier">Vim version 9.1.</span> Last change: 2024 May 16<br> |
7 | 7 | <br>
|
8 | 8 | <br>
|
9 | 9 | <span class="Identifier">VIM REFERENCE MANUAL by Paul Moore</span><br>
|
|
348 | 348 | the list of paths found in <a class="Type" href="options.html#'runtimepath'">'runtimepath'</a>: with this directory in sys.path and<br>
|
349 | 349 | vim.path_hooks in sys.path_hooks python will try to load module from<br>
|
350 | 350 | <span class="Special">{rtp}</span>/python2 (or python3) and <span class="Special">{rtp}</span>/pythonx (for both python versions) for<br>
|
351 |
| -each <span class="Special">{rtp}</span> found in <a class="Type" href="options.html#'runtimepath'">'runtimepath'</a>.<br> |
| 351 | +each <span class="Special">{rtp}</span> found in <a class="Type" href="options.html#'runtimepath'">'runtimepath'</a> (<span class="Todo">Note</span>: find_module() has been removed from<br> |
| 352 | +imp module around Python 3.12.0a7).<br> |
352 | 353 | <br>
|
353 | 354 | Implementation is similar to the following, but written in C:<br>
|
354 | 355 | <br>
|
|
409 | 410 | <br>
|
410 | 411 | vim.find_module(...) <a class="Constant" href="if_pyth.html#python-find_module" name="python-find_module">python-find_module</a><br>
|
411 | 412 | vim.path_hook(path) <a class="Constant" href="if_pyth.html#python-path_hook" name="python-path_hook">python-path_hook</a><br>
|
| 413 | +vim.find_spec(...) <a class="Constant" href="if_pyth.html#python-find_spec" name="python-find_spec">python-find_spec</a><br> |
412 | 414 | Methods or objects used to implement path loading as described above.<br>
|
413 | 415 | You should not be using any of these directly except for vim.path_hook<br>
|
414 |
| - in case you need to do something with sys.meta_path. It is not<br> |
415 |
| - guaranteed that any of the objects will exist in the future vim<br> |
| 416 | + in case you need to do something with sys.meta_path, vim.find_spec()<br> |
| 417 | + is available starting with Python 3.7.<br> |
| 418 | + It is not guaranteed that any of the objects will exist in future vim<br> |
416 | 419 | versions.<br>
|
417 | 420 | <br>
|
418 | 421 | vim._get_paths <a class="Constant" href="if_pyth.html#python-_get_paths" name="python-_get_paths">python-_get_paths</a><br>
|
|
0 commit comments