Show More
@@ -70,8 +70,7 class NotebookManager(LoggingConfigurable): | |||
|
70 | 70 | |
|
71 | 71 | def new_notebook_id(self, name): |
|
72 | 72 | """Generate a new notebook_id for a name and store its mappings.""" |
|
73 |
notebook_id = unicode(uuid.uuid |
|
|
74 | 'file://'+self.get_path_by_name(name).encode('utf-8'))) | |
|
73 | notebook_id = unicode(uuid.uuid4()) | |
|
75 | 74 | self.mapping[notebook_id] = name |
|
76 | 75 | self.rev_mapping[name] = notebook_id |
|
77 | 76 | return notebook_id |
@@ -6,7 +6,7 An HTML Notebook IPython | |||
|
6 | 6 | |
|
7 | 7 | The IPython Notebook consists of two related components: |
|
8 | 8 | |
|
9 |
* An |
|
|
9 | * An JSON based Notebook document format for recording and distributing | |
|
10 | 10 | Python code and rich text. |
|
11 | 11 | * A web-based user interface for authoring and running notebook documents. |
|
12 | 12 | |
@@ -24,7 +24,7 which will behave similar to the terminal and Qt console versions, using your | |||
|
24 | 24 | default matplotlib backend and providing floating interactive plot windows. If |
|
25 | 25 | you want inline figures, you must manually select the ``inline`` backend:: |
|
26 | 26 | |
|
27 |
$ ipython notebook --pylab |
|
|
27 | $ ipython notebook --pylab=inline | |
|
28 | 28 | |
|
29 | 29 | This server uses the same ZeroMQ-based two process kernel architecture as |
|
30 | 30 | the QT Console as well Tornado for serving HTTP requests. Some of the main |
@@ -33,7 +33,7 features of the Notebook include: | |||
|
33 | 33 | * Display rich data (png/html/latex/svg) in the browser as a result of |
|
34 | 34 | computations. |
|
35 | 35 | * Compose text cells using HTML and Markdown. |
|
36 |
* Import and export notebook documents in range of formats (.ipynb, . |
|
|
36 | * Import and export notebook documents in range of formats (.ipynb, .py). | |
|
37 | 37 | * In browser syntax highlighting, tab completion and autoindentation. |
|
38 | 38 | * Inline matplotlib plots that can be stored in Notebook documents and opened |
|
39 | 39 | later. |
@@ -47,7 +47,7 how to install the notebook and its dependencies. | |||
|
47 | 47 | work on notebooks in different directories. By default the first notebook |
|
48 | 48 | server starts in port 8888, later notebooks search for random ports near |
|
49 | 49 | that one. You can also manually specify the port with the ``--port`` |
|
50 | option, if you want persistent URLs you can bookmark. | |
|
50 | option. | |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | Basic Usage |
@@ -59,14 +59,14 in which the application was started, and allows you to create new notebooks. | |||
|
59 | 59 | |
|
60 | 60 | A notebook is a combination of two things: |
|
61 | 61 | |
|
62 |
1. |
|
|
62 | 1. An interactive session connected to an IPython kernel, controlled by a web | |
|
63 | 63 | application that can send input to the console and display many types of output |
|
64 | 64 | (text, graphics, mathematics and more). This is the same kernel used by the |
|
65 | 65 | :ref:`Qt console <qtconsole>`, but in this case the web console sends input in |
|
66 | 66 | persistent cells that you can edit in-place instead of the vertically scrolling |
|
67 | 67 | terminal style used by the Qt console. |
|
68 | 68 | |
|
69 |
2. |
|
|
69 | 2. A document that can save the inputs and outputs of the session as well as | |
|
70 | 70 | additional text that accompanies the code but is not meant for execution. In |
|
71 | 71 | this way, notebook files serve as a complete computational record of a session |
|
72 | 72 | including explanatory text and mathematics, code and resulting figures. These |
@@ -86,11 +86,10 Creating and editing notebooks | |||
|
86 | 86 | You can create new notebooks from the dashboard with the ``New Notebook`` |
|
87 | 87 | button or open existing ones by clicking on their name. Once in a notebook, |
|
88 | 88 | your browser tab will reflect the name of that notebook (prefixed with "IPy:"). |
|
89 |
The URL for that notebook is not meant to be human-readable |
|
|
90 |
persistent across invocations of the notebook server |
|
|
91 | rename the notebook*, so you can bookmark them for future use. | |
|
89 | The URL for that notebook is not meant to be human-readable and is *not* | |
|
90 | persistent across invocations of the notebook server. | |
|
92 | 91 | |
|
93 |
You can also drag and drop |
|
|
92 | You can also drag and drop into the area listing files any python file: it | |
|
94 | 93 | will be imported into a notebook with the same name (but ``.ipynb`` extension) |
|
95 | 94 | located in the directory where the notebook server was started. This notebook |
|
96 | 95 | will consist of a single cell with all the code in the file, which you can |
@@ -133,7 +132,7 Text input | |||
|
133 | 132 | |
|
134 | 133 | In addition to code cells and the output they procude (such as figures), you |
|
135 | 134 | can also type text not meant for execution. To type text, change the type of a |
|
136 | cell from ``Code`` to ``Markdown`` by using the button or the :kbd:`C-m m` | |
|
135 | cell from ``Code`` to ``Markdown`` by using the button or the :kbd:`Ctrl-m m` | |
|
137 | 136 | keybinding (see below). You can then type any text in Markdown_ syntax, as |
|
138 | 137 | well as mathematical expressions if you use ``$...$`` for inline math or |
|
139 | 138 | ``$$...$$`` for displayed math. |
@@ -167,7 +166,7 in comment areas. | |||
|
167 | 166 | through the Python form. You should think of the Python format as a way to |
|
168 | 167 | output a script version of a notebook and the import capabilities as a way |
|
169 | 168 | to load existing code to get a notebook started. But the Python version is |
|
170 |
*not* an alternate |
|
|
169 | *not* an alternate notebook format. | |
|
171 | 170 | |
|
172 | 171 | |
|
173 | 172 | Keyboard use |
@@ -185,13 +184,13 key bindings you need to remember are: | |||
|
185 | 184 | :kbd:`Shift-Enter` to get execution (or use the mouse and click on the ``Run |
|
186 | 185 | Selected`` button). |
|
187 | 186 | |
|
188 |
* :kbd:`C |
|
|
187 | * :kbd:`Ctrl-Enter`: execute the current cell in "terminal mode", where any | |
|
189 | 188 | output is shown but the cursor cursor stays in the current cell, whose input |
|
190 | 189 | area is flushed empty. This is convenient to do quick in-place experiments |
|
191 | 190 | or query things like filesystem content without creating additional cells you |
|
192 | 191 | may not want saved in your notebook. |
|
193 | 192 | |
|
194 |
* :kbd:`C |
|
|
193 | * :kbd:`Ctrl-m`: this is the prefix for all other keybindings, which consist | |
|
195 | 194 | of an additional single letter. Type :kbd:`Ctrl-m h` (that is, the sole |
|
196 | 195 | letter :kbd:`h` after :kbd:`Ctrl-m`) and IPython will show you the remaining |
|
197 | 196 | available keybindings. |
General Comments 0
You need to be logged in to leave comments.
Login now