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

Комментарии • 296

  • @eviltiki13
    @eviltiki13 3 года назад +10

    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!

  • @PegasusDesigns
    @PegasusDesigns 3 года назад +144

    This is absolutely gamechanging! I have used VSC for a year and did not know about this. Thank you so much!

  • @rabbitazteca23
    @rabbitazteca23 3 года назад +60

    VS Code is just SOOO good. Kudos to everyone contributing in making it better and better with every update

  • @ericervin2513
    @ericervin2513 3 года назад +3

    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.

  • @vaskoa
    @vaskoa 3 года назад +4

    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

  • @TheJunglist
    @TheJunglist 3 года назад +9

    This is fantastic, I've been looking for something like this for so long!

  • @sohangchopra6478
    @sohangchopra6478 2 года назад +1

    Can't thank you enough for making this video - this is such an amazing feature! Can't believe I never heard about this before!

  • @JanneSauvala
    @JanneSauvala 3 года назад +18

    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.

  • @smithright
    @smithright 3 года назад +11

    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!!! 😁

  • @anon343
    @anon343 3 года назад +3

    This is literally a whole new way of running code and I love it. Thanks. You earned yourself a sub!

  • @karnasaurav
    @karnasaurav 3 года назад +1

    That's awesome man. I have been switching between .py files and notebooks a lot. This is just awesome. THANKS!!

  • @pawel040408
    @pawel040408 2 года назад

    Really good overview - thanks for sharing. I've recently switched to VSC from Spyder and I keep discovering new cool features nearly every day!

  • @PaulFWatts
    @PaulFWatts 2 года назад

    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.

  • @rodrigobarrigagibson3400
    @rodrigobarrigagibson3400 2 года назад +1

    This is insane and a total game changer for my workflow... Thanks a lot!

  • @MauroBueno
    @MauroBueno 2 года назад

    Thanks for this video, Jack! Thanks a lot!

  • @Q_20
    @Q_20 3 года назад +28

    Combined with live share, this is revolutionizing collaborative research.

  • @abhaysharma8569
    @abhaysharma8569 2 года назад +2

    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.

  • @ViniciusRaphael
    @ViniciusRaphael 3 года назад +2

    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.

  • @usamairshad5729
    @usamairshad5729 2 года назад

    Nice and easy explanation... good work mate

  • @stevepepple1800
    @stevepepple1800 2 года назад +1

    Very cool workflow!
    I was able to also get this working with remote development in a Vagrant/Docker VM.

  • @stoicfloor
    @stoicfloor 3 года назад +70

    I used to need to switch to Chrome for Jupyter notebook but now not anymore!

  • @malanb5
    @malanb5 3 года назад

    Awesome, didn't know about this integration. thanks for sharing!

  • @user-ht7gg8xs3u
    @user-ht7gg8xs3u 7 месяцев назад

    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!

  • @ko-Daegu
    @ko-Daegu 3 года назад +58

    Your channel is basically group of great hidden gem altogether in one place

  • @losiu998
    @losiu998 3 года назад +3

    I've been using this for one year now. Cant imagine programming in python without this

  • @pleabargain
    @pleabargain 3 года назад +1

    Learned a lot. Thank you.

  • @summerstream4809
    @summerstream4809 3 года назад +2

    Found this on reccomendation; this is really worth spreading.

  • @marcus.the.younger
    @marcus.the.younger 3 года назад +28

    from pycharm to sublime text,
    i have tried many IDEs and editors but vscode tops them all...
    i absolutely love it

    • @joleif4970
      @joleif4970 3 года назад +9

      pycharm also has this feature btw :)
      (butthurt jetbrains fanboy over here haha)

    • @jthomas3584
      @jthomas3584 4 дня назад

      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.

  • @SamHartmannCom
    @SamHartmannCom Год назад

    Thanks a lot!
    That's really cool!

  • @YlmazDALKIRANscallion
    @YlmazDALKIRANscallion 2 года назад

    Thank you for the video!

  • @abduvosidmalikov
    @abduvosidmalikov 3 года назад

    This was new for me. Thanks!

  • @karlduckett
    @karlduckett 3 года назад +3

    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. :)

  • @TehAtomiq
    @TehAtomiq 3 года назад

    I am very used to matlab and this is exactly what i was missing from VS code. Thanks!!

  • @abhishekswain2502
    @abhishekswain2502 3 года назад

    Thanks for this ! This is very cool 😎

  • @kieranpeleaux
    @kieranpeleaux 3 года назад +2

    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?

  • @HorusEagletus
    @HorusEagletus 3 года назад

    Wow thanks for sharing! It is fantastic.

  • @HansBaier
    @HansBaier 3 года назад

    This is awesome! Thanks!

  • @FlavioBarrosProfessor
    @FlavioBarrosProfessor 3 года назад +66

    It is like working with R and RStudio

    • @MHNK77
      @MHNK77 3 года назад

      Not really. If you want that, using F9 in Spyder is where it's at

    • @xlw12
      @xlw12 3 года назад +1

      More like matlab :)

  • @josephchillemi7523
    @josephchillemi7523 3 года назад

    Wow, didn't know. Thank you so much!

  • @juliocjacobo
    @juliocjacobo 3 года назад

    Very good feature, and excellent video!!

  • @sarveshdakhane6454
    @sarveshdakhane6454 2 года назад

    Thanks !!..nicely explained

  • @izzyr9590
    @izzyr9590 3 года назад +1

    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

  • @cgabt1109
    @cgabt1109 2 года назад

    This video changed my Python life, thx

  • @DIYGURUJI
    @DIYGURUJI 3 года назад

    Damn, I didn't know that before Thanks🔥🔥

  • @PaulaBean
    @PaulaBean 3 года назад

    This was very helpful.

  • @juliocardenas4485
    @juliocardenas4485 2 года назад

    VERY useful, thank you.

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 3 года назад +2

    Truly cool. What key word can I Google to learn more?

  • @digigoliath
    @digigoliath 3 года назад

    Awesome!!! TQVM!!

  • @_free_explorer
    @_free_explorer 3 года назад +2

    Wow this just changed my python programming life O_O

  • @ahmed-salem
    @ahmed-salem 3 года назад +1

    No idea who are the 25 people that dislike a video like that!!... 😂😂. Thanks man for the video.. Such a game changer!

  • @shelupinin
    @shelupinin 3 года назад

    Cool, thanx for that knowledge

  • @kwkarlwang
    @kwkarlwang 3 года назад +7

    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.

  • @khanhtruong3254
    @khanhtruong3254 3 года назад

    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?

  • @amberniesalting9011
    @amberniesalting9011 3 года назад

    That's actually insane!

  • @beto5720
    @beto5720 2 года назад

    Bro this is dope af

  • @animeshsingh4290
    @animeshsingh4290 3 года назад +1

    Just saw these ina a Tech with Tim video, these are some really useful features.

    • @JackofSome
      @JackofSome  3 года назад

      Just found that video. Significantly better than mine :D

    • @JerryAsher
      @JerryAsher 3 года назад

      Hmm, can you link to that video?

  • @pope-pylinux-vi
    @pope-pylinux-vi 3 года назад

    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.

  • @fakt7814
    @fakt7814 Год назад

    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.

  • @angryferret101
    @angryferret101 2 года назад

    This is so fricking sublime.

  • @naturheilkunde-kanal9814
    @naturheilkunde-kanal9814 3 года назад

    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?

    • @JackofSome
      @JackofSome  3 года назад

      Do you have the python extension from microsoft installed?

  • @Deevil992
    @Deevil992 3 года назад

    Just curious if it is possible to load the python kernel in Jupyter from the terminal? That would actually do the same thing right?

  • @kia4now
    @kia4now Год назад

    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!

  • @dembasiby
    @dembasiby 3 года назад

    Thank you!

  • @Omgtired
    @Omgtired 3 года назад +22

    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

    • @hashisgod
      @hashisgod 3 года назад

      juniper? :O

    • @Omgtired
      @Omgtired 3 года назад

      @@hashisgod jupyter 😁 that's a typo

    • @hashisgod
      @hashisgod 3 года назад

      @@Omgtired i prefer the name juniper!

  • @ruysg
    @ruysg 2 года назад

    That is just like a Matlab or Spyder environment, pretty cool

  • @HadesTimer
    @HadesTimer 3 года назад

    is there anyway this can be added to your python environment by default? So I don't have to remember to add it everytime.

  • @user-md7yv4mw7e
    @user-md7yv4mw7e 3 года назад

    Is there any way to make VSCode help with function arguments as Jupyter notebook does when you press SHIFT+TAB?

  • @psykowarior
    @psykowarior 3 года назад

    Thanks this is usefull.

  • @theoutlet9300
    @theoutlet9300 3 года назад

    i cant imagine working with data in a code editor without this feature.

  • @williambaumert7726
    @williambaumert7726 2 года назад

    Wow this is really cool It's! It's very similar to rstudio's Rmarkdown interface!

  • @sagigamil460
    @sagigamil460 3 года назад

    Amazing; can I use it to run pytest tests?

  • @adamduma3565
    @adamduma3565 3 года назад

    nice. thanks

  • @vitormendonca2905
    @vitormendonca2905 3 года назад

    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?)

  • @MrTulufan
    @MrTulufan 2 года назад

    Is there a way to save the outputs inline with the code to a file just like the jupyter notebook?

  • @inkt34
    @inkt34 3 года назад

    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?

    • @JackofSome
      @JackofSome  3 года назад

      VSCode has horizontal stacking of windows. You'd have to Google how though I always forget

  • @SylvStone
    @SylvStone 2 года назад

    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.

  • @misimik
    @misimik 3 года назад +1

    You can get this type of workflow with Spyder IDE with Matlab View mode, but with better current variables window.

  • @timseguine2
    @timseguine2 3 года назад +1

    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.

  • @iamkapilkalra
    @iamkapilkalra 3 года назад

    Fantastic! :: Chef's Kiss ::

  • @cloutQ51
    @cloutQ51 3 года назад

    great man

  • @giaphatha88
    @giaphatha88 3 года назад +5

    Super cool! I didn t know vscode python support is so good now, time to ditch pycharm

  • @kenrosenberg8835
    @kenrosenberg8835 3 года назад

    Wow! I never knew it had a variable explorer

  • @PraecorLoth970
    @PraecorLoth970 3 года назад +12

    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?

    • @JackofSome
      @JackofSome  3 года назад +3

      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.

    • @PraecorLoth970
      @PraecorLoth970 3 года назад +1

      @@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.

  • @TunioMir
    @TunioMir 3 года назад

    Correct me if I'm wrong but Spyder (in Anaconda) has been doing this for years right?

  • @jtadams783
    @jtadams783 3 года назад +1

    I started learning python a few years ago. Thank you for reminding me how little I know.

  • @MiguelVazquez-kj2ve
    @MiguelVazquez-kj2ve 3 года назад

    I am genuinely elated / muchas gracias amigo ...

  • @edoson01
    @edoson01 3 года назад

    This functionality exists for years in notebooks and jupyterlab - open console along side the notebook.

  • @artistscientist2848
    @artistscientist2848 3 года назад

    @Jack Of Some
    Does someone know the keyboard shortcut move the cursor from the editor to the console where we can type code?

  • @gargeyasharma4858
    @gargeyasharma4858 3 года назад +5

    It's just spider IDE from anaconda distribution. But ofcourse its super cool and useful

    • @eduardoluisbaptista3297
      @eduardoluisbaptista3297 3 года назад

      Exactly! As a data analyst I'm not changing from Spyder to VS just because of this, to be honest.

  • @RazgrizDuTTA
    @RazgrizDuTTA 3 года назад +1

    This is nice thanks! But I prefer the Spyder IDE

  • @NicholasWong-vv1nn
    @NicholasWong-vv1nn Год назад

    Anyone know if it is possible to open the interactive tab in another window, or detach the tab from the workspace?

  • @JJGhostHunters
    @JJGhostHunters 2 года назад

    Is there a "Variable Explorer" available in VSCode as there is in Sypder?

    • @jimgriesmer7511
      @jimgriesmer7511 2 года назад

      Yes. It's in the toolbar. Not as full featured as Spyder yet, but it works. :)

  • @davidvargas3731
    @davidvargas3731 3 года назад +1

    Is there a quick way to remove all the `# %%` after you're done working on a file?

  • @lexborodai1639
    @lexborodai1639 2 года назад +1

    I type # %% in the python file using visual studio code, but nothing happens / nothing changes / any additional options appear. What do I do wrong? :(

  • @holski77
    @holski77 3 года назад

    THANK YOU SO MUCH!!!!!!!!!!!!!!!!!!!!!!!

  • @f3arbhy
    @f3arbhy 3 года назад

    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.

  • @xSid19x
    @xSid19x 2 года назад

    How do you escape out of the interactive cell?

  • @cenkulukaya
    @cenkulukaya 3 года назад +1

    This was the only reason I was using Sublime. That was eye opening. Thank you.

  • @yash1152
    @yash1152 11 месяцев назад

    1:53 yep, discovered this accidently myself some months ago. its nice.

  • @user-hj8rn5wp8z
    @user-hj8rn5wp8z 3 года назад

    Love to see it in PyCharm