[New-bugs-announce] [issue44673] Embedded Python - local directories in pythonXX._pth

emve report at bugs.python.org
Mon Jul 19 09:42:09 EDT 2021


New submission from emve <michal at vanka.net>:

When I add mylib to python39._pth, Python treats
it relatively to c:\Python3 (where my embedded python resides).

>>> import sys
>>> print('\n'.join(sys.path))
c:\python3\python39.zip
c:\python3
c:\python3\lib
c:\python3\mylib
c:\python3\lib\site-packages
>>>

However, my mylib directory is in my current project directory,
which is obviously not under c:\Python3

I know that the solution is to enter full path to mylib into python39._pth, but it is quite unconvenient as I have multiple projects, each with its own local modules in mylib directory.

Is there a way to simply add only one mylib
entry into python39._pth?

----------
messages: 397797
nosy: emve
priority: normal
severity: normal
status: open
title: Embedded Python - local directories in pythonXX._pth
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44673>
_______________________________________


More information about the New-bugs-announce mailing list