Skip to content

Suggestion: keep sys.path per Evaluator instance #384

@tkf

Description

@tkf

Currently Jedi uses sys.path directly and so editors have to modify sys.path in order to tell where modules locate. This is not ideal. For example, users may want to add Python 3 modules to sys.path while running Jedi in Python 2 (e.g., to write Python 2/3 compatible module). To do that, I suggest to keep additional paths in a place other than sys.path. Not only that, we can do more. If we keep sys.path per Evaluator instance, then we can ask Jedi "what kind of modules I'd have if I have this set of sys.path?" without running Jedi in another Python process. This may be useful, for example if you want to have different set of completions when you switch project.

(BTW, I am using partially 8 months-old knowledge of Jedi so, sorry if I miss some new features.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions