In this section:
- IPython Notebook Support
- Running IPython Notebook Cells
Overview
PyCharm provides initial for IPython Notebook. PyCharm recognizes
*.ipynb, and allows you to edit them.
IPython Notebook support
IPython Notebook files are marked with icon. Such files in the editor are represented with two tabs:
- Text tab that represent the plain text view of *.ipynb file
- <file name>.ipynb tab that shows document cells including code, text, equations etc.
IPython Notebook support includes:
-
Coding assistance:
- Error and syntax highlighting.
- Code completion.
- Ability to create line comments (Ctrl+Slash or Ctrl+NumPad /).
- Search and replace facilities: in a file, in path.
Creating and opening ipynb files
To create an *.ipynb file:
- Do one of the following:
- Right-click the target directory in the Project tool window, and choose New on the context menu.
- Press Alt+Insert
- Choose the option File.
- In the dialog box that opens, type the file name and extension .ipynb.
To open the existing .ipynb files, follow the same steps as for the files of the other types.
ipynb tab
As mentioned above, a *.ipynb file presentation in the editor has ipynb and text tabs. The ipynb tab features a toolbar with the following buttons:
Item | Tooltip | Description |
---|---|---|
![]() | Insert Cell Below | Click this button to add an empty cell under the current one. |
![]() | Cut Cell | Click this button to delete the current cell and place it to the clipboard. |
![]() | Copy Cell | Click this button to create copy of the current cell in the clipboard. |
![]() | Paste Cell Below | Click this button to the paste contents of the clipboard below the current cell. |
![]() | Run Cell | Click this button to execute the current cell. |
Styles drop-down list | Select the desired presentation style from the drop-down list. |