Show More
@@ -67,7 +67,7 b' The currently supported export formats are:' | |||
|
67 | 67 | * ``--to markdown`` |
|
68 | 68 | |
|
69 | 69 | Simple markdown output. Markdown cells are unaffected, |
|
70 |
and code cells are placed in triple-backtick (`` |
|
|
70 | and code cells are placed in triple-backtick (```````) blocks. | |
|
71 | 71 | |
|
72 | 72 | * ``--to rst`` |
|
73 | 73 |
@@ -102,14 +102,16 b' via the new nbconvert_ command.' | |||
|
102 | 102 | |
|
103 | 103 | Furthermore, any ``.ipynb`` notebook document available from a public |
|
104 | 104 | URL can be shared via the `IPython Notebook Viewer <nbviewer>`_ service. |
|
105 |
This service loads the notebook document from the URL and |
|
|
106 |
|
|
|
105 | This service loads the notebook document from the URL and renders | |
|
106 | it as a static web page. The results may thus be shared with a | |
|
107 | 107 | colleague, or as a public blog post, without other users needing to install |
|
108 |
IPython themselves. NbViewer is simply |
|
|
108 | IPython themselves. NbViewer is simply nbconvert_ as a simple webservice. | |
|
109 | 109 | |
|
110 | 110 | See the :ref:`installation documentation <install_index>` for directions on |
|
111 | 111 | how to install the notebook and its dependencies. |
|
112 | 112 | |
|
113 | .. _nbconvert: ./nbconvert.html | |
|
114 | ||
|
113 | 115 | .. _nbviewer: http://nbviewer.ipython.org |
|
114 | 116 | |
|
115 | 117 | .. note:: |
@@ -144,11 +146,11 b' source code files into the notebook list area.' | |||
|
144 | 146 | |
|
145 | 147 | |
|
146 | 148 | You can open an existing notebook directly, without having to go via the |
|
147 | dashboard, with: | |
|
149 | dashboard, with:: | |
|
148 | 150 |
|
|
149 | 151 | ipython notebook my_notebook |
|
150 | 152 | |
|
151 | The `.ipynb` extension is assumed if no extension is given. | |
|
153 | The ``.ipynb`` extension is assumed if no extension is given. | |
|
152 | 154 | |
|
153 | 155 | The `File | Open...` menu option will open the dashboard in a new browser tab, |
|
154 | 156 | to allow you to select a current notebook |
@@ -313,19 +315,6 b' correctly. This is much more convenient for interactive exploration than' | |||
|
313 | 315 | breaking up a computation into scripts that must be executed together, as was |
|
314 | 316 | previously necessary, especially if parts of them take a long time to run |
|
315 | 317 | |
|
316 | The only significant limitation that the Notebook currently has, compared to | |
|
317 | the Qt console, is that it cannot run any code that expects input from the | |
|
318 | kernel (such as scripts that call :func:`raw_input`). Very importantly, this | |
|
319 | means that the ``%debug`` magic does *not* currently work in the notebook! | |
|
320 | ||
|
321 | This limitation will be overcome in the future, but in the meantime, there is | |
|
322 | a simple solution for debugging: you can attach a Qt console to your existing | |
|
323 | notebook kernel, and run ``%debug`` from the Qt console. | |
|
324 | If your notebook is running on a local computer (i.e. if you are accessing it | |
|
325 | via your localhost address at ``127.0.0.1``), then you can just type | |
|
326 | ``%qtconsole`` in the notebook and a Qt console will open up, connected to | |
|
327 | that same kernel. | |
|
328 | ||
|
329 | 318 | At certain moments, it may be necessary to interrupt a calculation which is |
|
330 | 319 | taking too long to complete. This may be done with the ``Kernel | Interrupt`` |
|
331 | 320 | menu option, or the :kbd:``Ctrl-i`` keyboard shortcut. |
@@ -334,7 +323,12 b' process, with the ``Kernel | Restart`` menu option or :kbd:``Ctrl-.``' | |||
|
334 | 323 | shortcut. This gives an equivalent state to loading the notebook document |
|
335 | 324 | afresh. |
|
336 | 325 | |
|
337 | ||
|
326 | A notebook may be downloaded in either ``.ipynb`` or raw ``.py`` form from the | |
|
327 | menu option ``File | Download as``. Choosing the ``.py`` option downloads a | |
|
328 | Python ``.py`` script, in which all output has been removed and the content of | |
|
329 | Markdown cells in comment areas. See ref:`below <notebook_format>` for more | |
|
330 | details on the notebook format. | |
|
331 | ||
|
338 | 332 | .. warning:: |
|
339 | 333 | |
|
340 | 334 | While in simple cases you can "roundtrip" a notebook to Python, edit the |
@@ -558,14 +552,13 b' on available options, use::' | |||
|
558 | 552 | |
|
559 | 553 | $ ipython profile create |
|
560 | 554 | |
|
561 | .. seealso: | |
|
555 | .. seealso:: | |
|
562 | 556 | |
|
563 | 557 | :ref:`config_overview`, in particular :ref:`Profiles`. |
|
564 | 558 | |
|
565 | 559 | |
|
566 | Importing `.py` files | |
|
567 | ---------------------- | |
|
568 | ||
|
560 | Importing ``.py`` files | |
|
561 | ----------------------- | |
|
569 | 562 | |
|
570 | 563 | ``.py`` files will be imported into the IPython Notebook as a notebook with |
|
571 | 564 | the same basename, but an ``.ipynb`` extension, located in the notebook |
@@ -574,8 +567,24 b' all the code in the ``.py`` file. You can later manually partition this into' | |||
|
574 | 567 | individual cells using the ``Edit | Split Cell`` menu option, or the |
|
575 | 568 | :kbd:`Ctrl-m -` keyboard shortcut. |
|
576 | 569 | |
|
577 | .. Alternatively, prior to importing the ``.py``, you can manually add ``# < | |
|
578 | nbformat>2</nbformat>`` at the start of the file, and then add separators for | |
|
579 | text and code cells, to get a cleaner import with the file already broken into | |
|
580 | individual cells. | |
|
570 | Note that ``.py`` scripts obtained from a notebook document using nbconvert_ | |
|
571 | maintain the structure of the notebook in comments. Reimporting such a | |
|
572 | script back into the Notebook will preserve this structxure. | |
|
581 | 573 | |
|
574 | ||
|
575 | .. warning:: | |
|
576 | ||
|
577 | You can "roundtrip" a notebook to Python, by exporting the | |
|
578 | notebook to a ``.py`` script, editing the script, and then importing it back | |
|
579 | into the Notebook without loss of main content. However, | |
|
580 | in general this is *not guaranteed* to work. First, there is extra metadata | |
|
581 | saved in the notebook that may not be saved to the ``.py`` format. Second, | |
|
582 | as the notebook format evolves in complexity, there will be attributes of | |
|
583 | the notebook that will not survive a roundtrip through the Python form. You | |
|
584 | should think of the Python format as a way to output a script version of a | |
|
585 | notebook and the import capabilities as a way to load existing code to get | |
|
586 | a notebook started. But the Python version is *not* an alternate notebook | |
|
587 | format. | |
|
588 | ||
|
589 | .. seealso:: | |
|
590 | :ref:`notebook_format` |
@@ -5,10 +5,15 b' Working remotely' | |||
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | The IPython Notebook web app is based on a server-client structure. |
|
8 |
This server uses a two-process kernel architecture based on ZeroMQ, as well |
|
|
9 | Tornado for serving HTTP requests. Other clients may connect to the same | |
|
8 | This server uses a two-process kernel architecture based on ZeroMQ_, as well | |
|
9 | as Tornado_ for serving HTTP requests. Other clients may connect to the same | |
|
10 | 10 | underlying IPython kernel; see below. |
|
11 | 11 | |
|
12 | .. _ZeroMQ: http://zeromq.org | |
|
13 | ||
|
14 | .. _Tornado: http://www.tornadoweb.org | |
|
15 | ||
|
16 | ||
|
12 | 17 |
|
|
13 | 18 | |
|
14 | 19 | Security |
@@ -58,7 +63,7 b' the command::' | |||
|
58 | 63 | Your browser will warn you of a dangerous certificate because it is |
|
59 | 64 | self-signed. If you want to have a fully compliant certificate that will not |
|
60 | 65 | raise warnings, it is possible (but rather involved) to obtain one, |
|
61 |
|
|
|
66 | as explained in detail in `this tutorial`__. | |
|
62 | 67 | |
|
63 | 68 | .. __: http://arstechnica.com/security/news/2009/12/how-to-get-set-with-a- |
|
64 | 69 | secure-sertificate-for-free.ars |
General Comments 0
You need to be logged in to leave comments.
Login now