1

I started using Pycharm and managed to have the python prompt running after a file is run (link) and I found how to run pieces of code in the current iPython console (link).

For data science, however, it is very convenient to have a single iPython console/Python kernel where I can run files and code, just like Spyder does, and continue using the same started python kernel. For example to load a big amount of data with a script and write another script or pieces of code for plotting in different ways, exploring the data.

Is there a way in Pycharm to do it?

I think that it would imply generating automatically and running a line like: runfile('C:/temp/my_project/src/console/load_data.py', wdir='C:/temp/my_project/src')

If the option does not exist, is it possible to make a macro or similar to do it?

The option "Single instance only" in Edit configurations doesn't help.

rpicatoste
  • 479
  • 2
  • 16
  • Why not use Jupyter? You also can use Jupyter notebook files in PyCharm: [link](https://www.jetbrains.com/help/pycharm/using-ipython-jupyter-notebook-with-pycharm.html) – Georgy Feb 14 '18 at 12:27
  • 1
    For me, Jupyter is nice to show results, and for learning purposes, but for developing software I don't like it (work with multiple files, autocompletion, debugging, ...). In addition, version control is a must in my opinion, and jupyter doesn't work well with it... those are my main reasons. I wouldn't have strong arguments if you propose Spyder, but I started learning Pycharm and I find it really good as IDE, so I am trying to cover the last points I really would like to have available in my ideal Python IDE. – rpicatoste Feb 14 '18 at 14:40

0 Answers0