Skip to content

import a library from another vscode extension #21284

Answered by karthiknadig
BlackRam-oss asked this question in Q&A
Discussion options

You must be logged in to vote

@donrp To do this programmatically through a VS Code extension, currently you can only make this work for things running in terminal. This is the API https://code.visualstudio.com/api/references/vscode-api#EnvironmentVariableCollection

For intellisense, with either Jedi/Pylance, you can set the following setting programmatically python.autoComplete.extraPaths to include the path to renpy. This path should be similar to what you would do with PYTHONPATH.
From your screen shot and messages it should likely be like this: "python.autoComplete.extraPaths": ["/home/user/renpy"].

To validate the path before you add setting do this:

> export PYTHONPATH=/home/user/renpy
> python -c "import renpy"

W…

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
1 reply
@BlackRam-oss
Comment options

Comment options

You must be logged in to vote
6 replies
@gnikit
Comment options

@brettcannon
Comment options

@BlackRam-oss
Comment options

@karrtikr
Comment options

@gnikit
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@BlackRam-oss
Comment options

@karthiknadig
Comment options

@karthiknadig
Comment options

@BlackRam-oss
Comment options

Answer selected by BlackRam-oss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-environments Features relating to handling interpreter environments
6 participants