componentize-py icon indicating copy to clipboard operation
componentize-py copied to clipboard

Add support for .pth files

Open gdamjan opened this issue 2 weeks ago • 0 comments

A path configuration file is a file whose name has the form name.pth and exists in one of the four directories mentioned above; its contents are additional items (one per line) to be added to sys.path. Non-existing items are never added to sys.path, and no check is made that the item refers to a directory rather than a file. No item is added to sys.path more than once. Blank lines and lines beginning with # are skipped. Lines starting with import (followed by space or tab) are executed.

https://docs.python.org/3/library/site.html

.pth files are often used by python packaging systems (like uv, etc...) to make working on the current project more elegant, by pointing from the .venv/ path to the project path.

gdamjan avatar Nov 19 '25 20:11 gdamjan