-1

So I am trying to wean myself of R a bit more where using this keyboard combination:

CTRL + Enter

allows me to run parts of the code repeatedly (i.e. data frames etc. stay in memory) bit like in a notebook. For Python I can use:

CTRL + F5

to run all code or:

SHIFT + Enter 

to run code selection but I cannot run code repeatedly like in R (i.e. objects stay in memory)? Am I right? I wish that I am not haha. Any pointer very much appreciated! Thanks!

PS:

Related (?) discussion:

Python IDLE equivalent of CTRL-R in R

cs0815
  • 16,751
  • 45
  • 136
  • 299

1 Answers1

0

I don't know if I completely understand the question. But vsCode does support python notebooks. You can download a Extension called Jupyter to use it in VsCode. After downloading it you can open a .ipynb file to open the notebook inside VsCode. There is also online python notebook from Google at colab.research.google.com.

You can also download Anaconda and use the Jupyter Notebook that comes with it, as it also supports R. (see: docs)

  • I want to rather write "proper" python code than using POC type jupyter notebooks if that makes sense? – cs0815 Feb 14 '22 at 11:03
  • 1
    @cs0815 You can write proper python code using jupyter notebooks. I have run many programs using it including a couple web servers. You can also use `nbconvert` to run them in the command line. (see: https://stackoverflow.com/questions/35545402/how-to-run-an-ipynb-jupyter-notebook-from-terminal) – Videera Wijesundara Feb 14 '22 at 11:18
  • Thanks - I hope you know what i mean with proper code - will look into nbconvert - maybe that's the best option? – cs0815 Feb 14 '22 at 11:25