code_console.rst 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. .. _code-consoles:
  2. Code Consoles
  3. -------------
  4. Code consoles allow you to run code interactively in a kernel. The cells
  5. of a code console show the order in which code was executed in the
  6. kernel, as opposed to the explicit ordering of cells in a notebook
  7. document. Code consoles also display rich output, just like notebook
  8. cells.
  9. Create a new code console by clicking the ``+`` button in the file
  10. browser and selecting the kernel:
  11. [animation]
  12. Run code using ``Shift Enter``. Use the up and down arrows to browse the
  13. history of previously-run code:
  14. [animation]
  15. Tab completion (``Tab``) and tooltips (``Shift Tab``) work as in the
  16. notebook:
  17. [animation]
  18. Clear the cells of the code console without restarting the kernel by
  19. right-clicking on the code console and selecting “Clear Console Cells”:
  20. [animation]
  21. Creating a code console from the File menu lets you select an existing
  22. kernel for the code console. The code console then acts as a log of
  23. computations in that kernel, and a place you can interactively inspect
  24. and run code in the kernel:
  25. [animation]