Commit Graph

1351 Commits

Author SHA1 Message Date
MinRK
f51425ed28 clarify first ws message names / messages 2013-04-25 20:43:33 -07:00
MinRK
938a5b5dbc tweak raw_input style
more crowded, less jumpy
2013-04-25 17:28:03 -07:00
MinRK
ba79b60c35 fix color in raw_input 2013-04-25 16:19:15 -07:00
MinRK
3fbb99e61a add no-op on_message for iopub 2013-04-25 16:07:51 -07:00
MinRK
31c8fb1fb6 tweak raw-input styling
should fix alignment of raw_input and prompt
2013-04-25 14:18:21 -07:00
MinRK
f09eaf7b5e cleanup stdin event submission
follow example in rename notebook: remove form, bind keydown for enter,
avoiding shift-enter submitting the cell again.
2013-04-25 14:18:21 -07:00
MinRK
5b434b705f use inline raw_input instead of a dialog 2013-04-25 12:24:38 -07:00
MinRK
f38f2b7ac4 add stdin to notebook
dumb / gross / ugly jQuery modal dialog for now,
but it works!
2013-04-25 12:24:38 -07:00
MinRK
74f8972505 specify socket identity from kernel.js
required for stdin routing
2013-04-25 12:24:37 -07:00
MinRK
510897f0aa add stdin channel to NotebookApp 2013-04-25 12:24:20 -07:00
MinRK
f4b937767e share code between zmq channel handlers 2013-04-25 12:24:18 -07:00
Brian E. Granger
0d6676f340 Merge pull request #3088 from minrk/nbsettings
cleanup IPython handler settings
2013-04-25 12:19:44 -07:00
MinRK
217e38f102 hook up proper loggers
use IPython logger as first choice, fall back on tornado logger
(for use in non-IPython apps).
2013-04-25 12:15:49 -07:00
Brian E. Granger
646dcf77a4 Merge pull request #3201 from minrk/fastcolor
use much faster regexp for ansi coloring
2013-04-25 12:07:23 -07:00
MinRK
8c5a44813c hook up tornado 3's loggers to our handlers 2013-04-25 11:58:58 -07:00
MinRK
f0f0843cf2 define clear_cookie on websocket handler
as a no-op
2013-04-25 11:29:01 -07:00
MinRK
f887f050aa cleanup IPython handler settings
move settings to the tornado settings dict,
rather than a mixture of tornado settings and application references,
and application.ipython_app references.

removes any reference to application / ipython_app attributes in the handlers,
in favor of the tornado settings dict.
These were a massive pain for anyone who might want to re-use our handlers.
2013-04-25 10:06:10 -07:00
Brian E. Granger
13032d01ba Merge pull request #3011 from minrk/kernelclient
IPEP 12: add KernelClient
2013-04-25 10:04:47 -07:00
Min RK
2e5e595359 Merge pull request #3174 from Carreau/simple-class
Simple less classes

Simplify class handeling in js/css

Instead of setting several class (e.g: `cell vbox`) per dom element, use less to embed the definition of `vbox` into `cell`.

This should allow : 
   - more easy theming.
   - responsive css on  nbviewer 

There are many other places where this can be done.
2013-04-24 10:50:10 -07:00
Min RK
6ce1901e83 Merge pull request #2979 from Carreau/cm-configurable
CM configurable Take 2

Change the way configurability works.
Config dict should be passed down to the parent class where it will be
merged with the default value and propagate to this only in the base
class.

This allow to both alter the configuration on a per instance basis, or
globaly by tempering with the class instance.

This also get rid of IPython global in some cases.

-- 

Still not **perfect** but I think this is the limit of my js knowledge, there is a minimal amount of code of 4 line to propagate the configuration :

```
var options = {foo:bar}; // default options can be class parameter
var overwrite_options ={boo:baz}; // came from args, or not
options = this.mergeopt(CodeCell, options, overwrite options);
IPython.Cell.apply(this,[options]);
```
2013-04-24 10:46:56 -07:00
Min RK
33e4fdb600 Merge pull request #3181 from minrk/ifsince
backport If-Modified-Since fix from tornado

See facebook/tornado#713

closes #3177
2013-04-23 21:59:58 -07:00
MinRK
08cbf96075 don't restart channels on kernel restart
it wasn't actually necessary (proper fix in previous commit)
2013-04-23 21:47:51 -07:00
MinRK
e854617caf restart channels on kernel restart
generally not necessary, but sometimes the kernel connection can be dirty.
We have only seen this by starting a qtconsole via %qtconsole,
then killing the kernel, at which point the original notebook's connection
(at the zmq level) is never restored to the new kernel at the same endpoint.
It's weird, and probably a zmq bug, but a simple reconnect seems to solve it.
2013-04-23 21:47:51 -07:00
MinRK
05ead0496b delete notebook mapping in shutdown_kernel 2013-04-23 21:47:50 -07:00
MinRK
844758cca3 handle failed kernel restart in the notebook 2013-04-23 21:47:48 -07:00
MinRK
8204a6fb6d handle new autorestart javascript-side 2013-04-23 21:47:48 -07:00
MinRK
41f5d84680 send status messages when kernel is auto restarted 2013-04-23 21:47:48 -07:00
MinRK
5f600a5b9c cleanup boundaries of MultiKernelManager and KernelRestarter classes
- MultiKernelManager no longer has IOLoop affiliations
- move connect_[channel] method to base KernelManager
- connect_[channel] wraps in ZMQStream in IOLoopKM subclass
- add KernelRestarter base class
- use decorators to minimize code in wrapped KM methods
2013-04-23 21:47:45 -07:00
Brian Granger
14ef0ccb19 Refactoring kernel restarting. 2013-04-23 21:47:43 -07:00
Brian E. Granger
1c4f7d679a Removing heartbeat config from the MappingKernelManager. 2013-04-23 21:47:42 -07:00
Brian E. Granger
6c65e1a4fe Removing last remnant of heartbeat from IOPubHandler. 2013-04-23 21:47:42 -07:00
Brian E. Granger
4e0c180429 Starting to refactor heart beating of notebook kernels. 2013-04-23 21:47:42 -07:00
MinRK
bf69e92b57 use much faster regexp for ansi coloring
ansispan function adapted from mmalecki/ansispan

The easiest way to see how slow the old way was is to create a very large traceback (e.g. max recursion), which bring everything to a screeching halt (even future page loads, if the output is saved).  Now a max recursion error draws in a second or two.

closes #3198
2013-04-19 13:01:02 -07:00
Juergen Hasch
dd68727ff0 Add COMMAND keycode 2013-04-17 21:31:09 +02:00
Juergen Hasch
99af7b8a58 set <select> width to auto 2013-04-16 19:58:26 +02:00
Juergen Hasch
eb646bbf72 Improve special key handling in completer 2013-04-16 19:55:50 +02:00
Juergen Hasch
18aa1bd914 Add new keycodes 2013-04-16 19:34:20 +02:00
MinRK
09913471e7 backport If-Modified-Since fix from tornado
See facebook/tornado#713

closes #3177
2013-04-15 13:27:04 -07:00
Matthias BUSSONNIER
9a8301c9fd merge box-flex1 class into .output-area css definition 2013-04-14 15:46:10 +02:00
Matthias BUSSONNIER
afdb9b8cea include vbox into .cell css definition 2013-04-14 15:31:41 +02:00
Matthias BUSSONNIER
d5c744d74b include hbox in outpuarea css 2013-04-14 15:28:49 +02:00
Matthias BUSSONNIER
947c32bfc4 use hbox mixin instead of class
this will allow dynamic css in nbviewer like vbox-ing for low res
without JS or change in html
2013-04-14 15:25:14 +02:00
MinRK
cd0d29206f move check_for_zmq to utils.zmqrelated 2013-04-12 21:33:49 -07:00
MinRK
7ad15715a0 remove workarounds for no-longer-supported pyzmq versions 2013-04-12 21:25:18 -07:00
MinRK
5139e190d8 move DEFAULT_STATIC_FILES_PATH to frontend.html.notebook
and move the friendly version checks to notebookapp.py

DEFAULT_STATIC_FILES_PATH is now accessible without pyzmq/tornado/jinja being importable.
If someone tries to use old pyzmq or tornado directly with handlers,
the version check won't happen, but that's probably the right thing to do anyway.
2013-04-12 21:25:16 -07:00
Brian E. Granger
d53839666f Merge pull request #3144 from minrk/bower
minor bower tweaks
2013-04-12 21:20:55 -07:00
Min RK
98c672ad51 Merge pull request #3147 from meteogrid/rproxy_support
Notebook support for a reverse proxy which handles SSL

Added a "trust_xheaders" config option to NotebookApp to enable the passing of the xheaders flag to tornado.HTTPServer. This is necessary so tornado can generate the correct wss:// scheme
2013-04-12 16:15:53 -07:00
Brian E. Granger
0490978989 Merge pull request #3058 from minrk/redirect
add redirect handler for notebooks by name
2013-04-12 15:09:31 -07:00
MinRK
296587664d don't test for .ipynb in redirect handler
regex already guarantees it
2013-04-12 15:07:54 -07:00
Min RK
073f894e82 Merge pull request #3148 from ivanov/tornado-AI_ADDRCONFIG-patch
fix `gaierror: [Errno -9] Address family for hostname not supported`

error from unassociated interfaces.

related to facebook/tornado#593 - but the fix was only applied to 3.0

I've verified that this fix works for tornado 2.1, 2.4, 2.4.1, and the behavior it fixes does not trigger on tornado 3.0

closes #3045
2013-04-10 10:25:40 -07:00