-
Notifications
You must be signed in to change notification settings - Fork 293
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
Jupyter Notebook Import with Python Extension #3385
Comments
Sorry, not sure if I understand your request. Are you asking to have all ipynb files automatically import on open? That's not a current option. If you click the 'do not show again', you can use the command palette to import: Or right click on an ipynb file from the file pane. Note: you need to have the python extension loaded already for the menu or the command palette item to show up. That might be why you're not finding it. In order to load the python extension you have to open a '.py' file or an 'ipynb' file first. |
@SalChem, our plan is that when opening a notebook file, we will automatically show the last rendered version of the notebook in the interactive window. You'll be able to also import the notebook as a python file as a separate step. We'll also surround the preview of the notebook with some sort of indication that it's a preview and not executed cells. |
@greazer: Would it not be much better, that upon opening the notebooks only the rendered version gets displayed by default without showing the raw contents which in 99% of the times not intended and used? |
@Coderx7 can you elaborate more? Not sure what you mean by raw contents/rendered version. Notebooks internally have the source executed and the output html/javascript that was generated. When we open the preview, we show both the source and the html/javascript that was generated the last time the notebook was run (without executing anything again). It looks like this: |
Alternatively if you want a py file with just the source, then you would pick import. |
Seems very promising but where can I donwload and install this preview? this would make it much easier to give feedback. |
It's in the insider's build. To install this you go to your extension tab and click on the ... in the upper right. Then pick install from vsix. |
Unfortunately there always has to be two tabs. VS Code does not let our extension be the sole editor for .ipynb files, so they always open in a json editor. For your 'execute' option, we could add another command - Execute Notebook (or perhaps just add it into the preview UI) |
Why is there such a limitation? |
Yeah we could auto close the ipynb file. That's not a bad idea, well unless somebody actually wants to edit it. Hmm. I'll talk it over with other people to see what they think. I don't think VS Code would be happy about it though. VS Code doesn't let extensions be the sole editor for a file because they are worried about extensions ruining the editing experience. VS Code was originally just supposed to be a text editor. You can see this when editing markdown for example. In order to see the real markdown, you have to open another tab. |
I'm going to add your previewer idea too. Sounds like a good improvement. |
Thanks a lot really appreciate it. |
Is there a way to how to automatically set the "Jupyter notebook import" by default? so that the popup message doesn't show everytime. I could not find a way to do so.
Also, after clicking "Do not show again", I can not find a way to add "jupyter notebook import".
What's the situation on these please?
The text was updated successfully, but these errors were encountered: