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

python current working directory #140

Open
@artpelling

Description

@artpelling

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions