Skip to content

How to start python extension automatically in a workspace? #5553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
znd4 opened this issue May 4, 2019 · 5 comments
Closed

How to start python extension automatically in a workspace? #5553

znd4 opened this issue May 4, 2019 · 5 comments

Comments

@znd4
Copy link

znd4 commented May 4, 2019

Hello! I love vscode, and the python extension especially. The new vscode remote extension makes the story even better.

I do find one thing to occassionally be a bit of a minor inconvenience, however:

It doesn't seem like the python extension starts up in a vscode workspace until I do one of a few things -- (open a .py file, run a python - * command in the Ctrl+Shift+P command pallete, etc). This means that if I open up a terminal window before I've done one of those things, my virtual environment for that workspace won't be activated.

I would love to be able to specify in a workspace that I want the python extension to automatically boot up with the workspace. I asked @DonJayamanne about this in person early today (by the way, it was really awesome to meet you!) and he recommended I submit an issue.

I think he described creating a minimal extension that requires the python extension, but I'm still not sure how to go about that.

Thanks, and sorry for the wall of text!

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 4, 2019
@karrtikr
Copy link

Hi @zdog234 , will this do that for you?
Or do you wish the activate the python extension everytime regardless of the workspace content.

@karrtikr karrtikr added info-needed Issue requires more information from poster triage labels May 14, 2019
@karrtikr karrtikr self-assigned this May 14, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 14, 2019
@znd4
Copy link
Author

znd4 commented May 15, 2019

@karrtikr Thanks for pointing me to #4765. That would definitely be a major quality-of-life improvement. It seems like it'll help a lot when working on structured projects (packages or applications). And for less-structured projects (like a short-turnaround analytics project), I can always just throw one of those files in as a placeholder (it's always worthwhile to have pylint running, even for quick scripts).

@znd4 znd4 closed this as completed May 15, 2019
@ghost ghost removed info-needed Issue requires more information from poster triage labels May 15, 2019
@DonJayamanne
Copy link

Reopening to provide a simple extension sample that'll auto activate the extension for you, (as promised at PyCon, will provide sample instructions to build it your self)

@DonJayamanne DonJayamanne reopened this May 15, 2019
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 15, 2019
@karrtikr karrtikr removed their assignment May 15, 2019
@DonJayamanne
Copy link

@zdog234 Apologies for the delay, the source and the release of the VSIX can be found here https://github.com/DonJayamanne/vscode-activate-python-extension/releases/tag/0.0.1

  • Please download the VSIX from the release page.
  • Go into VSCode, select the command Extensions: Instal from VSIX
  • Select the above VSIX and that's it

The Python extension will automatically load everytime.

Note: If you don't want the python extension to load everytime in some places, then:

  • Just disable this extension in the specific workspaces (this is possible in VSC),
  • Just go into the extension and disable for current workspace.

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 17, 2019
@znd4
Copy link
Author

znd4 commented May 17, 2019

Thanks so much! Also, I love that you put this up as a github repo for posterity :D

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
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

3 participants