"You are looking at an **IPython Notebook**, an interactive Python shell inside of a web browser. With it, you can run individual Python commands and immediately view their output.\n",
"\n",
"It's basically the Matlab Desktop or Mathematica Notebook for Python.\n",
"\n",
"An IPython Notebook is comprised of **cells**. Cells are just small units of code or text. They allow you to edit, execute, and analyze small portions of code at a time.\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Modes\n",
"-----\n",
"\n",
"The IPython Notebook has two different keyboard input modes. \n",
"\n",
"In **Edit Mode**, you type code/text into a cell. Edit Mode is indicated by a *green* cell border. \n",
"\n",
"To enter Edit Mode from Command Mode, press `Enter`. You can also double-click on a cell.\n",
"\n",
"To execute the code inside of a cell and move to the next cell, press `Shift-Enter`. (`Ctrl-Enter` will run the current cell without moving to the next cell. This is useful for rapidly tweaking the current cell.)\n",
"\n",
"In **Command Mode**, you can perform notebook level actions such as navigating among cells, selecting cells, moving cells, saving notebooks, displaying help. Command Mode is indicated by a *grey* cell border. \n",
"\n",
"To enter Command Mode from Edit Mode, press `Esc`. Other commands can also enter Command Mode, e.g. `Shift-Enter`.\n",
"\n",
"To display the Help Menu, press `h`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tab Autocompletion\n",
"-----\n",
"\n",
"Tab autocompletion works in Command Window and the Editor. After you type a few letters, press the `Tab` key and a popup will appear and show you all of the possible completions, including variable names and functions. This prevents you from mistyping the names of variables -- a big time saver! \n",
" \n",
"For example, type `librosa.` and then press `Tab`. You should see a list of members in the Python package `librosa`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Saving\n",
"------\n",
"\n",
"Your code goes directly into an IPython notebook. To save your changes, click on the \"Save\" icon in the menu bar, or type `s` in command mode.\n",
"\n",
"If you want to undo a saved edit, use `git checkout -- <file>` to revert the change."