brutally replace all `exeption <type>, <name>:` by
`exception <type> as <name> :`
`exception <type>, <type> :` should not be present anywhere in the code
anymore, or should be present with explicit tuple as
`exception (<type>, <type>)`
this improve the current css of the print page and add css to the
classical notebook with print as target to get a better print view ant
the ability to directly print a notebook without going through the print
view
Fix spurious appearance of the #fontarea when fonts don't have any problem; also remove loud dialog when problematic font is detected and simply adjust baseline. Users will have a slightly offset baseline for bold/italic highlights, but without any functional problems.
Fixes#2005.
Clean BG processes created by %%script on kernel exit
* uses less forceful shutdown of kernels in the notebook, allowing atexit machinery to fire
* enables daemon BackgroundJobs
* cleanup %%script --bg subprocesses at shutdown
minor notebook startup/notebook-dir adjustments
* change inaccurate / distressing "Overwriting profile..." log message
* `ipython notebook path` results in setting notebook-dir if it's a dir,
rather than unconditionally setting file-to-run
* file-to-run overrides no-browser
* kernels start in the notebook dir, rather than the Server's cwd
* notebook dir is validated, and created if it doesn't exist (only if parent exists, like ~all other such things)
closes#1985closes#1980
second attempt at scrolled long output
Some amount of CSS tweaking will probably want to be done before 0.13 final,
but this is good enough for beta.
closes#1553
Cell/Worksheet metadata
* metadata dicts are attached to cells and worksheets
* restores collapsed flag to the nbformat - this change happened in the refactor, and was undocumented, and possibly accidental. But we should either document it or fix it, and this includes a fix.
* adds a new field, `nbformat_minor`, used to denote minor bumps of the notebook format that expose new capabilities but don't prevent loading by older clients.
* Add a warning in Javascript if loading a multiworksheet notebook (which will exist in the future) as current JS code will only save the first.
closes#1915
fix for #1678, undo no longer clears cells
With these changes, Ctrl-Z inside of codemirror cells will only undo up to the text that was in the cell when it was loaded from JSON.
closes#1678
I found another bug where switching the cell type causes the loss of all
undo history for that cell. With this commit, switching the cell type
simply resets the history
Remove remaining references to deprecated XREP/XREQ names.
There was only one actual use of the deprecated constants in code, but numerous mentions in docstrings, etc.
These names have been removed from the next libzmq release, and will presumably be removed from pyzmq someday.
only one line of actual code is changed.
these names have been removed from the next libzmq release,
and will presumably be removed from pyzmq someday.
Increase duration of save messages and write permanent 'failed' message to the save status area on failed save.
Not a pop-up as described in #1461, but significantly more prominent, and most importantly permanent when saving fails, at least until the next successful save.
Closes#1461.
Add %%octave, %octave, %octave_pull and %octave_push magics to facilitate interaction with Octave via oct2py. This is similar in spirit to the R magic extension.
New `%%capture` cell magic captures stdout/err while running a cell.
Uses `capture_output()` context manager, moved to utils.io from IPython.parallel testing utilities, where it originated.
The caputre objects can be printed as a string, case in which they display the captured stdout, which is also available as `.stdout`. The captured stderr, if any, is in a `.stderr` attribute. A `.show()` method can be called to quickly print both, with stderr being correctly printed to the sys.stderr stream (so the notebook displays it with red highlighting).
closes#1863
Fix 1px margin bouncing of selected menu item.
This fixes the margin of the active menu item to zero, so now the text doesn't shift around, even if you use larger fonts.
To reproduce the original error, zoom your notebook (ctrl-mousewheel, or ctrl-+ in most browsers) and try the menu.
Fix vertical offset due to bold/italics, and bad browser fonts.
Adds a dialog warning users when a problematic monospaced font is detected, so they can change their configuration.
There was a bug in NotebookManager.save_notebook_object.
Here is how to reproduce:
0. Make sure you don't have Untitled0.
1. Open new notebook Untitled0.
2. Rename it to something else.
3. Copy Untitled0.ipynb to the notebook dir from somewhere.
(Do not use notebook UI.)
4. New copied Untitled0 cannot be opened.
The renamed notebook is opened when tried.
Indeed, accessing to http://localhost:XXXX/notebooks shows
duplicated notebook_id.
The problem was that NotebookManager.rev_mapping keeps old notebook
name after renaming.
Make : invalid in filenames in the Notebook JS code.
This only prevents : in the filenames on the JavaScript side of things. Handling this on the server side will be a separate issue that is related to other open issue. I will update those to reflect this.
closes#1781
Rmagic extension to use R (the statistical package) seamlessly from IPython.
The rmagic extension allows R inline code as well as cell level magics. An example notebook is provided in docs/examples/notebooks/rmagic_extension.ipynb to demonstrate its usage.
Main points:
1) Allows capture of plots to R via inline png plots (like --pylab inline)
2) Allows capture of R's stdout() connection to the notebook
3) Allows simple push/pull for array data to/from R (via rpy2) with copy only on push to R -- this seems necessary.
When kernel is died and restarted, or restarted while it is in the
busy state, message "(Busy)" on the window title is not updated. This
problem is fixed by updating document title when restarting.
it seem that show and hide methods fron tooltip where collinding with
jquery, sometime blocking the notebook.
Move from css fadeIn/Out to jQuery fade In/Out, and replace
addRemoveClass by fadeIn/fadeOut
For security reasons, the kernel should not be started until
after the notebook content is completely loaded and on the page.
This prevents people from creating notebooks that run nasty code
on the users machine at load time.
In order to implement this, we had to create a CodeCell.set_kernel
method that allows the kernel attribute of a CodeCell to be set
at a later time. This also fixes some error messages we were
seeing related to the kernel's channels not being setup properly
when a send was attempted.
Use notification to quicky remind use of the tooltip
Use javascript in notebook to make a live demo in
01_notebook_introduction
tooltip docstring is remplaceid for the first use by a live tutorial
I had removed the choice for the user to not restart a dead kernel
but we are using that elsewhere. Eventually we may not give them
a choice, but for now we will use that model.
* Kernel doesn't depend on Notebook or CodeCell.
* CodeCell doesn't depend on Notebook, only Kernel.
* All of the kernel management logic has been moved out of the
Notebook into the Kernel.
* Public methods of the Kernel (execute, complete, etc) take
a callbacks object that registers the callbacks for that msg.
(rebased, cherrypicked, by Bussonnier Matthias <bussonniermatthias@gmail.com>)
(and tabs removed)
Conflicts:
IPython/frontend/html/notebook/static/js/codecell.js
IPython/frontend/html/notebook/static/js/completer.js
IPython/frontend/html/notebook/static/js/tooltip.js
consecutives tab pressing with tooltip does :
- fisrt : show it
- second : expand it
- third : make it sticky for 10s (typing wont dismiss it)
- forth : send the content into the Pager
Completion source based on context is smarter and use codemirror token
mecanisme to propose completions, instead of just plitting text at
whitespace and before dots.
more feature like
-completion based on 2 sources :
* introspection in kernel
* context of current cell (complete with matching words)
* each source has its color in the completer
Warn on nonexistent exclusions in iptest. This will help us avoid common and often baffling errors from simple typos, as well as keeping the exclusions list updated as the code evolves.
Dashboard improvement
see #1658#1676
Allow to shutdown the kernels from the dashboard,
autorefresh dashboard,
add a native upload method, especially for https/chrome/linux that prevent drag and drop
Cython related magic functions: offers the new cell magics %%cython_inline, %%cython_pyximport and %%cython to make it very easy to put cython-accelerated code in a cell and have it loaded interactively.