IPython Notebook lets you do more than just program

Slashdot it! Delicious Share on Facebook Tweet! Digg!

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:

  1. An empty line indicates a new paragraph.
  2. A * indicates a list element.
  3. #, ##, 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.

Figure 2: Displaying Markdown text in the IPython Notebook.

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.

Figure 3: A question mark brings up Help for an object.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content