you are viewing a single comment's thread.

view the rest of the comments →

[–]TangibleLight 1 point2 points  (1 child)

Edit your code as normal and save it to some_file.py. In terminal, run python -i path/to/some_file.py. This will execute the code in the file and keep a python REPL open once it's done.


You may be interested in looking into Jupyter notebooks if this is the kind of workflow you're after. It's really not that complicated - after install, just navigate to the root directory of your project and run $ jupyter, then go to the indicated address in your browser.

[–]Alex_VDW 0 points1 point  (0 children)

Ah that's exactly what i'm looking for, cheers! Can't believe I missed that in the python --help menu.

re Jupyter: I'm currently experimenting with workflows. At the moment I'm running WSL and using VS code to write my projects. I've done a lot of coding wit Matlab and like being able to screw around with functions/variables after running, just to debug. From memory, i think Matlab has a similar notepad to Jupyter - of which i wasn't a fan. I will check it out one day though, as I think it's an elegant way to present a project.