VSCode's Python Interactive mode is AMAZING!
HTML-код
- Опубликовано: 5 авг 2020
- I've gone from serial Jupyter Notebook user to someone that almost never uses them and it's all thanks to VSCode's interactive mode for Python. Check it out!
MY OTHER VIDOES:
○ A.I. Learns to play Snake • Neural Network Learns ...
○ 5 Common Python Mistakes: • 5 Things You're Doing ...
○ 5 Amazing Python Libraries: • Five Amazing Python Li...
○ Making Python fast: • Can VSCode be a reason...
○ Learning programming language Julia: • How to learn Julia, a ...
Twitter: / safijari
Patreon: / jackofsome
#python #vscode #notebooks
Been trying out VS code for Python and didn't know this existed. Very happy I found your short and informative video. Looking forward to trying it out. Thanks!
This is absolutely gamechanging! I have used VSC for a year and did not know about this. Thank you so much!
VS Code is just SOOO good. Kudos to everyone contributing in making it better and better with every update
Excellent video! Short and sweet, hit all the high points, exactly what I was looking for. I couldn't figure out how to open the interactive interpreter for non- ipynb files and presto you showed me that and much more.
Now this, this looks amazing. I've been looking something like this for a while, something that has the feel and experience of a CAS but with a sane syntax and documentation. Awesome
This is fantastic, I've been looking for something like this for so long!
Can't thank you enough for making this video - this is such an amazing feature! Can't believe I never heard about this before!
Cool feature! Interactive development with the integration between editors and REPLs were the reason why I fall in love with Clojure (and in other LISPs) and this starts to be something similar to that.
I'm new to Python, taking my first steps to learning a full stack. This is the best editor setup I've found anywhere. Thanks so much for posting!!! 😁
This is literally a whole new way of running code and I love it. Thanks. You earned yourself a sub!
That's awesome man. I have been switching between .py files and notebooks a lot. This is just awesome. THANKS!!
Really good overview - thanks for sharing. I've recently switched to VSC from Spyder and I keep discovering new cool features nearly every day!
Thanks for making this video. I didn't know this feature existed!
As you have pointed out it is amazing and so useful. Especially when you are a relative new comer to Python like myself.
I love Vscode and it just keeps getting better and better.
This is insane and a total game changer for my workflow... Thanks a lot!
Thanks for this video, Jack! Thanks a lot!
Combined with live share, this is revolutionizing collaborative research.
I was trying to get a plot on my vscode for the last 4 hours. I just couldn't figure out what was missing. Thank you so much for this video, you probably saved another 4 hours of mine.
Man this is amazing. Seriously. Thanks for sharing.
I'll definetely try.
It's kind frustrating to have to create in jupyter and then change to py to create an exec. Will try for sure.
Nice and easy explanation... good work mate
Very cool workflow!
I was able to also get this working with remote development in a Vagrant/Docker VM.
I used to need to switch to Chrome for Jupyter notebook but now not anymore!
Exactly!
Awesome, didn't know about this integration. thanks for sharing!
This is a lifesaver! I'm used to Matlab and recently picked up Python. It's great to check what I'm doing. Thank you!
Your channel is basically group of great hidden gem altogether in one place
might as well change the channel name to Laugh Tale
I've been using this for one year now. Cant imagine programming in python without this
Learned a lot. Thank you.
Found this on reccomendation; this is really worth spreading.
from pycharm to sublime text,
i have tried many IDEs and editors but vscode tops them all...
i absolutely love it
pycharm also has this feature btw :)
(butthurt jetbrains fanboy over here haha)
What does VSCode have that PyCharm doesn't? Genuinely asking as I've been using PyCharm/Jetbrains products for a while now. I find that even for non-Python development, PyCharm seems to do the trick.
Thanks a lot!
That's really cool!
Thank you for the video!
This was new for me. Thanks!
Damn this is really cool!
Still have a soft spot to Jupyter Labs. I guess it would be good to build the notebook in VS - then export the final version back to Jupyter to export to HTML with the markdown and interactive widgets. :)
I am very used to matlab and this is exactly what i was missing from VS code. Thanks!!
Thanks for this ! This is very cool 😎
this is super helpful, thanks! just out of curiosity, how did you get the "Save As" file naming functionality (02:03) in the command palette vs. the usual "Save As" dialog that opens in a new window?
Wow thanks for sharing! It is fantastic.
This is awesome! Thanks!
It is like working with R and RStudio
Not really. If you want that, using F9 in Spyder is where it's at
More like matlab :)
Wow, didn't know. Thank you so much!
Very good feature, and excellent video!!
Thanks !!..nicely explained
Wow even the debugger!
I liked the debugger set up in Eclipse for Java. I didn’t know python had it too in VSCode! This is awesome
This video changed my Python life, thx
Damn, I didn't know that before Thanks🔥🔥
This was very helpful.
VERY useful, thank you.
Truly cool. What key word can I Google to learn more?
Awesome!!! TQVM!!
Wow this just changed my python programming life O_O
No idea who are the 25 people that dislike a video like that!!... 😂😂. Thanks man for the video.. Such a game changer!
Cool, thanx for that knowledge
I want to inform you that I was able to get this exact feature on emacs on a normal .py file using code-cells, which recognizes # %% as a cell, and emacs-jupyter, which serves as a REPL that evaluates the python code, and is also able to render inline plot.
That's amazing. But it seems that I can only run the interactive mode at the end of the python script, i.e. I can't come back to normal scripting unless I delete all the interactive code.
Is there anyway to select a subset (in the middle) of the script to run interactive mode?
That's actually insane!
Bro this is dope af
Just saw these ina a Tech with Tim video, these are some really useful features.
Just found that video. Significantly better than mine :D
Hmm, can you link to that video?
Great video, thank you. Looks like you also have the same problem with pylint as I do (I mean the pop-up near the end). I have it installed but this pop-up shows up every time I start vscode. Can't figure out the cause.
Wow, I didn't know about that. Me too have been using Jupyter a lot, then I switched to a regular step debugger, but the ability to use IPython with debugger is a game changer for me.
This is so fricking sublime.
Sounds great!
I tried it with my VSCode on OSX but get an error message: "Cannot open resource with notebook editor type 'jupyter-notebook', please check if you have the right extension installed or enabled."
What extension do I need?
Do you have the python extension from microsoft installed?
Just curious if it is possible to load the python kernel in Jupyter from the terminal? That would actually do the same thing right?
is it possible to open the interactive window seperately, to mimic floating windows? Because running out of real estate on one screen
Great video and well explained, subscribed!
Thank you!
Working in python in the same manner, the big advantage of this mode over notebook is that it supports all additional "syntax checkers" whereas juniper notebook mode does not
juniper? :O
@@hashisgod jupyter 😁 that's a typo
@@Omgtired i prefer the name juniper!
That is just like a Matlab or Spyder environment, pretty cool
is there anyway this can be added to your python environment by default? So I don't have to remember to add it everytime.
Is there any way to make VSCode help with function arguments as Jupyter notebook does when you press SHIFT+TAB?
Thanks this is usefull.
i cant imagine working with data in a code editor without this feature.
Wow this is really cool It's! It's very similar to rstudio's Rmarkdown interface!
Amazing; can I use it to run pytest tests?
nice. thanks
Cool but.. i'm a begginer in programing, why should i use a code editor like Visual Studio? Just for the shortcuts? (Isn't pycharm enough?)
Is there a way to save the outputs inline with the code to a file just like the jupyter notebook?
Nice video, is there also a way to move the interactive notebook screen to e.g., the bottom of VS code? So that the .py file and the python interactive window are on top of each other?
VSCode has horizontal stacking of windows. You'd have to Google how though I always forget
nice but it does not work for me (some info is missing here). I'd have some questions, what vsCode version are you using? once managed to install mumpy and matplotlib within a PowerShell CLI rather, all I got as output for that example: 'plot([0,1,2],[0,1,4])' is: but displaying nothing.
You can get this type of workflow with Spyder IDE with Matlab View mode, but with better current variables window.
I never really found any personal benefit to jupyter notebooks or interactive mode in the past, because the user experience for the text editor always seemed pretty terrible, but this looks pretty slick, actually.
Fantastic! :: Chef's Kiss ::
great man
Super cool! I didn t know vscode python support is so good now, time to ditch pycharm
Wow! I never knew it had a variable explorer
Well, this really looks like the Spyder IDE, at least what I remember of it. It has been a few years since I used it. And is kinda like Matlab also, but that doesn't have inline graphs. I think I will stick to notebooks still because I like having the code and the graphs in one document, and not having to re-run it in case I need to see the graphs again. In any case, one could export .ipynb files to executable .py files and very easily convert them to the format VSCode uses, just need to alter the comment lines between each cell. I haven't tested it, but seems trivial.
I have often seen people criticize the use of notebooks because they give you bad development practices. One problem I've had more than once was re-running a notebook and getting NameErrors, often because I moved stuff around. How do you deal with that?
I totally get the "notebook as a complete document" approach and it makes a lot of sense in many contexts. For me notebooks are more about exploration/prototyping/development and less about communication so that's why this makes more sense for me.
Exporting .ipynb can run into issues, though nbdev is admittedly a really good solution github.com/fastai/nbdev
No real solution for the out of order execution issues. We kind of sign up for that doing this no? A saving grace of using interactive mode is that I have access to all my normal keybindings, so restructuring code is really fast and intuitive.
@@JackofSome thanks for the link, I had heard about nbdev, I think I might give it a shot, although I'm not really developing stuff recently. I do mostly data analysis, hence my preference for notebooks. I am working on consolidating some stuff to share with colleagues, and nbdev might be cool.
I think I just need more discipline when coding, and periodically reset the environment, to catch those errors. I mean, I use notebooks for reproducibility in science, and fear rerunning them? Makes no sense.
Correct me if I'm wrong but Spyder (in Anaconda) has been doing this for years right?
I started learning python a few years ago. Thank you for reminding me how little I know.
I am genuinely elated / muchas gracias amigo ...
This functionality exists for years in notebooks and jupyterlab - open console along side the notebook.
@Jack Of Some
Does someone know the keyboard shortcut move the cursor from the editor to the console where we can type code?
Unfortunately no. Sorry
It's just spider IDE from anaconda distribution. But ofcourse its super cool and useful
Exactly! As a data analyst I'm not changing from Spyder to VS just because of this, to be honest.
This is nice thanks! But I prefer the Spyder IDE
Anyone know if it is possible to open the interactive tab in another window, or detach the tab from the workspace?
Is there a "Variable Explorer" available in VSCode as there is in Sypder?
Yes. It's in the toolbar. Not as full featured as Spyder yet, but it works. :)
Is there a quick way to remove all the `# %%` after you're done working on a file?
I type # %% in the python file using visual studio code, but nothing happens / nothing changes / any additional options appear. What do I do wrong? :(
THANK YOU SO MUCH!!!!!!!!!!!!!!!!!!!!!!!
Maybe a little brag here. One of the IDEs that comes with vanilla Anaconda installation is called Spyder, and it focuses almost entirely on a setup like that. There is a ( rather less capable) text editor, an interactive python shell, variable explorer etc. I started using that when I started learning python, and to be honest, it robbed me my ability to write decent .py files, as I use the text editor as a" code snippet bucket" and runs the code on the IE in chunks. I think , if you are starting out, you should really write your code in a single file and run the file. It helps alot in the long run.
How do you escape out of the interactive cell?
This was the only reason I was using Sublime. That was eye opening. Thank you.
1:53 yep, discovered this accidently myself some months ago. its nice.
Love to see it in PyCharm