IPython Notebook lets you do more than just program
|
Markup with Markdown
The box with the gray background is ready for the input of Python commands, but you can also use it to enter formatted text.
To do this, you will need to change the box's type using the drop-down menu at the top: Change the option from Code to Markdown . Markdown is a very popular tool because it is simple and also because it lets you use HTML directly if necessary. There are three basic rules in using Markdown, which if followed, result in text with a very satisfactory appearance.
These three rules are:
- An empty line indicates a new paragraph.
- A * indicates a list element.
- #, ##, and ### indicate heading levels 1, 2, and 3.
Figure 2 shows an example of Markdown text. Additionally, you can use the Shift+Enter keys to enter a new line.
Python in the Browser
Python code is the core of the IPython Notebook. As with an interactive prompt, the result for an expression comes back when the command is submitted, here with Shift+Enter. The numbering for the input cell In[1]: corresponds with the result in Out[1]: and so on. Syntax coloring and automatic indentation are standard. Tab expansion and interactive help offer convenience. A question mark immediately following the name of the object you would like to know more about (e.g., sys? ) brings up the integrated documentation and some additional information as shown in Figure 3.
Buy this article as PDF
Pages: 4
(incl. VAT)