...
Python IDEs, such as PyCharm, provide an interactive environment and even debugging facilities.
Jupyter notebook
A Jupyter notebook provides an interactive workspace combining code, plots and documentation. It runs in a web browser and can be started from the command-line as follows:
Code Block | ||
---|---|---|
| ||
jupyter notebook |
This command will open a new tab in your web browser, or you can copy the URL yourself.
Now, create a new Notebook using the menu:
You can start typing your code into the boxes. Press CTRL-Return to execute the code in the current cell, or SHIFT-Return to execute and move to the next code cell. To generate plots inside the notebook, call
Code Block | ||
---|---|---|
| ||
mv.setoutput('jupyter') |
at some point before calling the plot()
command.