|
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 バージョン 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 バージョン 9.1.</span> Last change: 2024 May 16<br> |
7 | 7 | <br>
|
8 | 8 | <br>
|
9 | 9 | <span class="Identifier">VIMリファレンスマニュアル by Paul Moore</span><br>
|
|
339 | 339 | という特別なディレクトリが使われます。このディレクトリが sys.path 内で使われる<br>
|
340 | 340 | とき、そして vim.path_hooks が sys.path_hooks 内で使われるとき、<a class="Type" href="options.html#'runtimepath'">'runtimepath'</a><br>
|
341 | 341 | の各パス <span class="Special">{rtp}</span> に対して <span class="Special">{rtp}</span>/python2 (or python3) と <span class="Special">{rtp}</span>/pythonx (両バー<br>
|
342 |
| -ジョンで読み込まれる) のモジュールがロードされます。<br> |
| 342 | +ジョンで読み込まれる) のモジュールがロードされます (<span class="Todo">Note</span>: find_module() は、<br> |
| 343 | +Python 3.12.0a7 辺りで imp モジュールから削除されました)。<br> |
343 | 344 | <br>
|
344 | 345 | 実装は以下のようになっています。ただし実際は C で書かれています: ><br>
|
345 | 346 | <br>
|
|
399 | 400 | <br>
|
400 | 401 | vim.find_module(...) <a class="Constant" href="if_pyth.html#python-find_module" name="python-find_module">python-find_module</a><br>
|
401 | 402 | vim.path_hook(path) <a class="Constant" href="if_pyth.html#python-path_hook" name="python-path_hook">python-path_hook</a><br>
|
| 403 | +vim.find_spec(...) <a class="Constant" href="if_pyth.html#python-find_spec" name="python-find_spec">python-find_spec</a><br> |
402 | 404 | 上述のパスフックの実装に使われるメソッドとオブジェクト。sys.meta_path<br>
|
403 | 405 | で vim.path_hook を使って何かをするようなことがなければ、これらを直接<br>
|
404 |
| - 使用することはないでしょう。これらのオブジェクトが Vim の将来のバー<br> |
405 |
| - ジョンでも存在するかどうかは保証されません。<br> |
| 406 | + 使用することはないでしょう。vim.find_spec() は Python 3.7 以降で使用可<br> |
| 407 | + 能です。<br> |
| 408 | + これらのオブジェクトが Vim の将来のバージョンでも存在するかどうかは保<br> |
| 409 | + 証されません。<br> |
406 | 410 | <br>
|
407 | 411 | vim._get_paths <a class="Constant" href="if_pyth.html#python-_get_paths" name="python-_get_paths">python-_get_paths</a><br>
|
408 | 412 | パスフックで検索されるパスのリストを返すメソッド。将来のバージョンのこ<br>
|
|
0 commit comments