Commit graph

55 commits

Author SHA1 Message Date
John Miller
b1f4c017e7 Support single websocket with multiple channels
With IPython 3.0 we now support multiplexed communication over a single
websocket. At the moment iopub and shell are supported; stdin doesn't
seem to be working yet (not sure if it needs to be, though).
2015-01-14 17:07:28 -06:00
John Miller
5cdb7ca907 Do connect-request on initial connect
Not sure if we need to do this, or what purpose it might serve, but
seems more appropriate than sending a kernel_info_request when opening
websocket channels.

Also make message handler kernel inactive error messages more
informative.
2014-11-16 11:49:02 -06:00
John Miller
30564f8eda Include session when opening websocket.
Ipython 3.0-dev has been complaining for a while that ein doesn't
specify a session-id when opening a websocket channel to a notebook.
2014-11-16 08:12:04 -06:00
John Miller
228d97f397 Fixing nasty mismatch in saved notebook v4 format
There is a nasty mismatch between internal representation of cell
outputs in ein and for cell outputs in notebook v4.

The current solution is less than elegant, but seems to work. Need more
testing!
2014-11-13 21:36:43 -06:00
John Miller
59072658aa IPython 3.0 Support
Maybe, just maybe ein now works under both IPython 2.x and IPython 3.0
(or what is the development version as of this commit). And by works I
mean open, closing, saving notebooks and communicating with the IPython
kernel. It is good.

Also fixed a bug in kernelinfo - os.uname is not implemented in Windows
(or mac, probably), but I think socket.gethostname() is available on all
three platforms.
2014-10-22 21:35:20 -05:00
John Miller
f39c57a633 Directory bugfix. First steps in IPython 3.0 support.
Fixed bug in accessing directories a depths greater than 1 level.

Some initial support for IPython 3.0 and IPEP 27. Can open notebooklists
and notebooks, but having some issues connecting to websocket.
2014-10-17 16:44:04 -05:00
gcr
9c90f25e5a Handle pager opening
Before, this fork has a small regression: Typing 'thing?' into the shell does not open the pager. This small change fixes this small regression.
2014-05-23 15:21:16 -04:00
millejoh
3b0498655c Support kernel reset operations. 2014-05-10 12:59:03 -05:00
John Miller
20a725012b Preliminary support for IPython 2.0
Basic, mostly untested support for the brave new world of IPython 2.0.
2.0 now supports the concepts of 'paths', letting notebooks be stored in
a directory hierarchy. This has resulted in a change in the web API -
most URL's are now prefixed with 'api/'.

EIN does not (yet) support hierarchical notebooks, but at least it now
plays better with the new URL scheme for iPython 2.0.

Oh, there also seems to have been a change in the format of the ipython
notebook. This has been fixed too, but is probably bakcwards
incompatible.
2014-04-14 12:48:55 -05:00
Takafumi Arakaki
ff622a6468 Fix how ws_url is set
IPython notebook 1.0.dev sends empty ws_url as of this PR
https://github.com/ipython/ipython/pull/3307
2013-06-10 19:56:46 +02:00
Takafumi Arakaki
a5a246c734 Check ein:kernel-live-p in ein:ac-* functions 2013-02-13 21:06:50 +01:00
Takafumi Arakaki
955a82461e Follow change in IPython kernel: payload key
This is the change introduced by ipython/ipython#2872
2013-02-10 05:00:40 +01:00
Takafumi Arakaki
20818f2e77 Do not list duplications when searching history
The key 'unique' is introduced in IPython as of:
https://github.com/ipython/ipython/pull/2792
2013-01-18 14:28:21 +01:00
Takafumi Arakaki
735e14e7b4 Add ein:kernel-kernel-info-request
See: ipython/ipython#2649
2013-01-18 14:03:17 +01:00
Takafumi Arakaki
2f317bf2e4 Remove unsupported :cache argument 2012-12-29 18:55:06 +01:00
Takafumi Arakaki
fdb80c9962 Rewrite callbacks: replace cons with apply-partially 2012-12-29 18:55:06 +01:00
Takafumi Arakaki
992104ebf5 Send proper cookie in ein:kernel-send-cookie 2012-12-17 17:39:46 +01:00
Takafumi Arakaki
ec70eb916f Stop when kernel_id and ws_url are not sent from server
This does not fix anything.  But make error clearer.
see #85
2012-12-04 11:12:16 +01:00
Takafumi Arakaki
2865bc1ff5 Refactor ein:kernel--kernel-started 2012-12-04 11:06:04 +01:00
Takafumi Arakaki
361bee7998 Prevent triggering execution_count.Kernel with nil 2012-10-09 20:26:45 +02:00
Takafumi Arakaki
28ba5e9ad1 Add execution_count.Kernel event 2012-10-09 20:09:23 +02:00
Takafumi Arakaki
610f6c5423 Comment example kernel urls 2012-09-30 17:22:37 +02:00
Takafumi Arakaki
18dec8a1cb Cleanup FIXMEs 2012-09-11 01:47:50 +02:00
Takafumi Arakaki
d10565b052 Change default n value in ein:kernel-history-request 2012-09-08 00:04:08 +02:00
Takafumi Arakaki
851c6c96d2 Add ein:kernel-history-search-synchronously 2012-09-05 22:47:11 +02:00
Takafumi Arakaki
6f1a11be30 Add autoload cookies 2012-09-01 20:51:55 +02:00
Takafumi Arakaki
ca8c1678fe (require 'ein-utils) -> (require 'ein-core) 2012-08-28 15:26:32 +02:00
Takafumi Arakaki
7dff9d7f6a Add FIXMEs on ein:$kernel 2012-08-28 15:06:28 +02:00
Takafumi Arakaki
4a1b812e21 Define "public" method ein:kernel-url-or-port 2012-08-28 14:55:22 +02:00
Takafumi Arakaki
8ce439b927 Add ein:kernel-history-request 2012-08-28 12:18:12 +02:00
Takafumi Arakaki
22a316d48f Remove ein:*-sync-directory
As kernelinfo does the job, these functions are not needed.
2012-08-26 23:10:20 +02:00
Takafumi Arakaki
f83623ace6 Move kernelinfo into a separate module 2012-08-26 15:14:59 +02:00
Takafumi Arakaki
71472ddaac More docstring on ein:kernelinfo-update-* 2012-08-21 09:59:35 +02:00
Takafumi Arakaki
6f7bc7b7ca Fix notebook buffer directory sync with kernel 2012-08-21 09:59:08 +02:00
Takafumi Arakaki
f32a169920 Move tooltip and help command to pytools
ein-notebook.el and ein-connect.el can share same command thanks to
the generic getter function.
2012-08-19 21:48:28 +02:00
Takafumi Arakaki
e426340cd3 Fix: ein:tb-show did not work in shared-output buffer
It did not work because ein:get-notebook does not work.  Notebook
is not well defined in shared-output buffer since it knows only
about kernel (through cell).  This reflect the design that kernel
and notebook is well decoupled.
2012-08-15 20:54:22 +02:00
Takafumi Arakaki
b39fc5cc6b Use multi-line message in ein:kernel--websocket-closed 2012-08-12 18:54:03 +02:00
Takafumi Arakaki
3b1e76f48c Add ein:display-warning 2012-08-12 17:48:24 +02:00
Takafumi Arakaki
12fae49898 Fix arguments of other callbacks
Any callbacks called from ein:kernel--handle-shell-reply are passed
metadata.  Therefore, complete/tooltip callbacks must be changed.
2012-08-08 23:27:07 +02:00
Takafumi Arakaki
9f1b319333 Document and add FIXMEs in ein:kernel-execute 2012-08-08 22:15:22 +02:00
Takafumi Arakaki
c798f7d143 Adapt to new kernel-execute API
This is required to avoid wrong-number-of-arguments error,
unlike javascript.
2012-08-08 21:30:14 +02:00
Takafumi Arakaki
b799de0cbe Add metadata to argument for kernel-execute CBs 2012-08-08 21:18:00 +02:00
Takafumi Arakaki
41bc85f9c7 Improve ein:kernel-execute docstring 2012-08-08 20:05:46 +02:00
Takafumi Arakaki
ed0bd74630 Adapt to new messaging protocol (add metadata)
As this change just introduces an additional key in outgoing
message, the new version of EIN also works with previous versions
of IPython.

fixes #46
2012-08-08 19:33:51 +02:00
Takafumi Arakaki
c4924efdbd Refactor ein:filename-to/from-python functions 2012-08-04 02:13:14 +02:00
Takafumi Arakaki
d2c8c5eee6 Document ein:kernel-request-stream 2012-08-04 00:04:16 +02:00
Takafumi Arakaki
7a7e1bfa31 Use filename translator in ein:kernelinfo-update-ccwd 2012-08-03 23:28:38 +02:00
Takafumi Arakaki
5af748430b Fix tooltip help when it is not found
ein:kernel-construct-help-string returned empty string when help
is not found in the previous version.
2012-07-25 21:54:56 +02:00
Takafumi Arakaki
8827f2d9e6 Tweak debug log in ein:kernel-construct-help-string 2012-07-25 18:59:41 +02:00
Takafumi Arakaki
19563ceb4e Refactor ein:kernel-construct-help-string 2012-07-25 18:55:55 +02:00