Commit Graph

951 Commits

Author SHA1 Message Date
MinRK
1cd79e1461 test for pygments before running qt tests 2012-05-22 14:38:59 -07:00
Min RK
c6fedc3456 Merge pull request #1686 from punchagan/notebook-cmd-line
ENH: Open a notebook from the command line

open notebook files from the command line, just
like ipython can open (run) python files.  For example:

     ipython notebook foo.ipynb

closes #945
2012-05-13 16:08:34 -07:00
Fernando Perez
72721e208d Merge pull request #1710 from minrk/mathjaxcdn
update MathJax CDN url for https

As discussed on mathjax-users, the MathJax CDN is moving. This doesn't affect mathjax from http, which just uses cdn.mathjax.org, but for SSL-certiificates the actual CDN url must be used (formerly cloudfront, now rackcdn).

Also, forgo gethostbyname_ex hack, that was me solving a theoretical problem that could not officially happen.

0.12-series is unaffected, as the https-cdn hack was not backported to 0.12.1.
2012-05-09 17:02:20 -07:00
MinRK
f72eebe15f update with forthcoming MathJax CDN move 2012-05-07 13:18:29 -07:00
Puneeth Chaganti
1e9d2f4a1c ENH: Open a notebook from the command line
This commit lets you open notebook files from the command line, just
like ipython can open (run) python files.  For example:

     ipython notebook foo.ipynb

Fixes #945.
2012-05-07 10:27:25 +05:30
Bussonnier Matthias
1c957417e9 Merge pull request #1698 from Carreau/fixes-1696
fix tooltip on token with number

fix #1696
2012-05-06 01:42:04 -07:00
Matthias BUSSONNIER
8462288405 fix tooltip on token with number
fixes #1696
allow number in matched token for tooltip, except first position
also prevent matching token starting wit a dot
2012-05-04 09:13:43 +02:00
MinRK
97151aa3b8 revert PR #1659
caused critical problems with subprocess output.

See `!ls` for an example.
2012-04-29 23:52:07 -07:00
Min RK
721e83a61e Merge pull request #1659 from mdboom/notebook-carriage-return
Handle carriage return characters ("\r") in HTML notebook output.
2012-04-27 13:50:00 -07:00
Michael Droettboom
a5d7dd8d2b Fix typo in comment 2012-04-27 16:48:04 -04:00
Michael Droettboom
e8be6bbe50 Fix the "test for nothing was streamed" so it doesn't add empty elements -- but only when there wasn't already something there. 2012-04-26 10:00:16 -04:00
Michael Droettboom
50fa35b1cc Handle carriage return characters ("\r") in HTML notebook output. 2012-04-25 13:16:33 -04:00
Fernando Perez
0b6aa846e1 Merge pull request #1652 from minrk/zmqcompat
add patch_pyzmq() for backporting a few changes from newer pyzmq

* fixes missing constants in super-old pyzmq
* define ioloop.install if not defined
* never allow jsonlib to be used by zmq.utils.jsonapi (#1520).

Closes #1520.
2012-04-23 22:59:07 -07:00
MinRK
86e3e953da add ioloop.install to backported patches 2012-04-23 16:59:00 -07:00
Fernando Perez
e5e200eaa7 Merge pull request #1621 from ivanov/clear-input-prompt-on-clear-all-output
clear In[] prompt numbers on "Clear All Output"

For more version-control-friendly `.ipynb` files, this strips the `In[]` prompt numbers when doing a "Clear all output".  This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes.
2012-04-18 23:06:32 -07:00
Fernando Perez
53ccdfbd44 Merge pull request #1627 from minrk/msgspec
Test the Message Spec and add our zmq subpackage to the test suite.

It uses Traitlets to perform validation of keys.

Checks right now are not very strict, as (almost) any key is allowed to be None, as long as it is defined.  This is because I simply do not know which keys are allowed to be None, and this is not discussed in the specification.  If no keys are allowed to be None, we violate that all over the place.

Parametric tests are used, so every key validation counts as a test (147!).

Message spec doc was found to misrepresent code in a few points, and some changes were made:

* spec had error keys as `exc_name/value`, but we are actually using `ename/value` (docs updated to match code)
* payloads were inaccurate - list of dicts, rather than single dict, and transformed_output is a payload, not top-level in exec-reply (docs update to match code).
* in oinfo_request, detail_level was in message spec, but not actually implemented (code updated to match docs).

History messages are not yet tested, but I think I get at least elementary coverage of everything else in the doc.
2012-04-18 15:40:47 -07:00
MinRK
6419b0b130 include IPython.zmq in iptest groups 2012-04-18 15:32:43 -07:00
Fernando Perez
496d6331c5 Merge pull request #1624 from takluyver/i1470
Two distinct but related fixes for byte-compilation on Python 3.

* A slight hack so setuptools refrains from trying to byte-compile everything - issue #1470. The actual modules are still compiled by another step when I do `python3 setup.py install`, but that step is smart enough not to try to compile the examples as well.

* A workaround for a bug in Python 3.1 - py_compile had only partly implemented PEP 263, so it recognises `coding:`, but not `encoding:` to specify a file encoding. This was causing build failures since my `nonascii.py` test sample was merged.

Closes #1470.
2012-04-18 13:08:54 -07:00
Thomas Kluyver
e825279ded Force setuptools to skip byte compilation when installing on Python 3.
Closes gh-1470
2012-04-18 14:02:29 +01:00
Paul Ivanov
06dd2b00c6 clear In[] prompt numbers on "Clear All Output" 2012-04-17 18:48:30 -07:00
Fernando Perez
af3dd115a3 Merge pull request #1609 from minrk/sigterm
exit notebook cleanly on SIGINT, SIGTERM, and add a safety (text) dialog to ask for exit confirmation.  This prevents an accidental Ctrl-C in the wrong window from destroying a user's potentially large set of notebooks that could have taken a long time to create.

Closes #1601
2012-04-16 12:32:18 -07:00
MinRK
6e2694a9d9 handle old pyzmq in notebook exit confirmation
* 2.1.7 (earliest dep) will simply not work, so skip it
* 2.1.9-10 log the interrupts, so add a short delay to ensure the log
  messages don't come after the prompt.
2012-04-16 11:59:55 -07:00
MinRK
c5d7d6f08a confirm notebook shutdown on SIGINT
confirmation in bg thread, to avoid blocking
5s timeout before restoring original state if no response

^C^C == confirmation
2012-04-15 23:25:09 -07:00
Fernando Perez
8e4d5e90a8 Merge pull request #1604 from takluyver/exclude-quarantine-package
Exclude IPython.quarantine from installation.  The code is still in the source tree so we can gradually revive what's useful, but there's no point in installing it for regular users since by definition it's broken.
2012-04-15 14:35:34 -07:00
MinRK
3c19b40d2f exit notebook cleanly on SIGINT, SIGTERM
makes it a bit more likely security files, etc. will be cleaned up.
2012-04-15 12:06:05 -07:00
Thomas Kluyver
2c693fc89b Exclude IPython.quarantine from installation. 2012-04-15 12:49:46 +01:00
Fernando Perez
0344f92a62 Merge pull request #1490 from minrk/raw
rename plaintext cell -> raw cell

Raw cells should be *untransformed* when writing various output formats, as the point of them is to let users pass through IPython to their rendered document format (rst, latex, etc.).  This is different from what is the logical meaning of 'plaintext', which would suggest that the contents should be preserved as unformatted plaintext (e.g. in a `<pre>` tag, or literal block).

In the UI, these cells will be displayed as 'Raw Text'.

WARNING: any existing v3 notebooks which use plaintext cells, when read in by versions after this merge, will silently rename those cells to 'raw'.  But if such a notebook is uploaded into a pre-merge IPython, cells labeled as 'raw' will simply *not be displayed*.
2012-04-14 17:46:25 -07:00
MinRK
e7a45e9454 add VERSIONHACK markers for never-released plaintext handling 2012-04-14 16:02:53 -07:00
Min RK
ee9cbf39cb Merge pull request #1594 from takluyver/setupbase-py3
Fix writing git commit ID to a file on build with Python 3

use builtin open / str literals instead of io.open & unicode.
2012-04-14 11:39:00 -07:00
Thomas Kluyver
2711bdf8dd Fix writing git commit ID to a file on build with Python 3. 2012-04-14 18:32:49 +01:00
Fernando Perez
526d842289 Merge pull request #1502 from minrk/pyflakes
small changes in response to pyflakes pass

Only significant change: removes incomplete kernelstarter file, which shouldn't have been in the repo at all.

closes #1499
2012-04-14 02:33:29 -07:00
Fernando Perez
ffe488ee0b Emergency fix for py3 breakage introduced in 576f6f (merge of #1538)
Unicode literals (u'foo') aren't valid in Python 3.{1,2} (they will be
again in 3.3, and I failed to notice this.  This is a quick fix, will
discuss further on-list.  But I want master to remain working for py3
users.
2012-04-14 02:10:58 -07:00
Fernando Perez
4b73021647 Merge pull request #1445 from minrk/nosphinx
Don't build sphinx docs for sdists, it makes our source distributions unnecessarily large (and their generation much slower).  Online access to docs is pervasive these days, and our docs are also much easier to build now, reducing the justification for keeping built docs in the source download.
2012-04-14 00:54:37 -07:00
Fernando Perez
6e5d8d5d1a Merge pull request #1538 from minrk/git_info
store git commit hash in utils._sysinfo instead of hidden data file

Behavior is essentially unchanged, but the hash is stored in a generated Python file instead of hidden data file.

Closes #1484.
2012-04-13 22:54:05 -07:00
MinRK
cc4f0f3619 use writelines when writing _sysinfo.py 2012-04-13 21:47:40 -07:00
Fernando Perez
98ac51808e Merge pull request #1563 from minrk/clear_output
clear_output improvements, which allow things like progress bars and other simple animations to work well in the notebook.

* `clear_output()` clears the line, even in terminal IPython, the QtConsole and plain Python as well, by printing `\r` to streams.

* `clear_output()` avoids the flicker in the notebook by adding a delay, and firing immediately upon the next actual display message.

* `display_javascript` hides its `output_area` element, so using display to run a bunch of javascript doesn't result in ever-growing vertical space.
2012-04-13 21:12:23 -07:00
Fernando Perez
14d29450a3 Merge pull request #1560 from minrk/testdocs
remove obsolete discussion of Twisted/trial from testing docs

We don't use trial anymore, so these docs were no longer accurate.

closes #1558
2012-04-13 20:31:32 -07:00
Min RK
c543852c33 Merge pull request #1552 from minrk/fix1550
use os.getcwdu in NotebookManager

prevents unicode error when starting in non-unicode path.

closes #1550
2012-04-09 17:37:08 -07:00
MinRK
9cb1559d5e document initially hidden javascript container 2012-04-09 15:35:29 -07:00
MinRK
c21be2f386 hide output_area for js
prevents growing vertical space from adding empty output_areas.
2012-04-09 15:35:29 -07:00
MinRK
5c6c247b65 [notebook] clear_output is handled after a delay
This reduces flicker during common loops like:

for step in stuff:
    clear_output()
    print something

the timeout is flushed *immediately* on any subsequent output.
2012-04-09 15:35:28 -07:00
MinRK
fe92e50471 remove a few more obsolete twisted notes 2012-04-09 11:01:21 -07:00
MinRK
124037690e use os.getcwdu in NotebookManager
prevents unicode error when starting in non-unicode path.
2012-04-04 09:48:29 -06:00
Min RK
a9e226f943 Merge pull request #1544 from minrk/multilingual
make MultiKernelManager.kernel_manager_class configurable
2012-04-02 19:15:15 -07:00
MinRK
fd2cc9d19e make MultiKernelManager.kernel_manager_class configurable
This allows deployments to use customized KernelManager subclasses via config.
2012-03-31 19:24:38 -07:00
MinRK
0495291a83 store git commit hash in utils._sysinfo instead of hidden git_commit_info.ini data file. 2012-03-30 14:17:16 -07:00
Min RK
c7de46e6cc Merge pull request #1508 from minrk/i1507
fix sorting profiles in clustermanager

dicts aren't orderable on Python3. In any case, these should be sorted by name, not by the ordering of the dicts themselves.

closes #1507
2012-03-16 16:30:00 -07:00
MinRK
600acfb694 fix sorting profiles in clustermanager 2012-03-16 14:52:06 -07:00
MinRK
f9438de710 small changes in response to pyflakes pass
removes incomplete kernelstarter file, which shouldn't be in the repo at all yet.
2012-03-15 15:54:20 -07:00
MinRK
9927cec392 denote raw cell with 'Raw Text' in UI 2012-03-14 15:07:55 -07:00