Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

python current working directory #140

Open
artpelling opened this issue Jan 23, 2021 · 0 comments
Open

python current working directory #140

artpelling opened this issue Jan 23, 2021 · 0 comments

Comments

@artpelling
Copy link

I have an issue similar to #120 and #96, where imports of project modules fail when I send a file to the python interpreter with C-c C-c that is located in a subfolder of my project.

I tried all suggested solutions, but to no avail. The variables lsp-workspace-root and projectile-project-root are set correctly, but py-current-working-directory is always the directory of the file and the top-level project path is not part of sys.path().

The lsp-mode functionalities such as code completion and tooltips all work fine for said modules, so I am pretty sure it has something to do with how arguments are passed to python-mode. I can get everything to work as wanted, if I start the python process with run-python from the top-level directory first and then send the file to the interpreter, but this is inconvenient.

Maybe I am missing something or it is a problem with python-mode. I would be very happy, if someone could point me in the right direction!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant