dalejung / inode

Interactive Node.js
MIT License
3 stars 1 forks source link

ipython magic #10

Closed dalejung closed 11 years ago

dalejung commented 11 years ago

Think that I want the following ipython magic features

%ipy_list - list the active ipython kernels. For ipycli, this is a service call. I think this is possible with vanilla ipython as well

%attach - attach to a specific kernel. At connection, we will probably want to send some function definitions to the kernel.

two way bridge - At connect, send python code that will enable a bridge that goes the other way. this is referenced in #7

%pull varname - pull a python variable and bring it into inode scope. This will likely require a python function that we put into kernel scope on connect.

I think I want to keep all this on the inode side, which means that the python side doesn't need to import a module, we install our functions when we attach.

dalejung commented 11 years ago

%ipy_list, %attach and %ipy done.

dalejung commented 11 years ago

Need to double back and see how to add variables to REPL scope from ipython execute.

dalejung commented 11 years ago

Thinking about supporting a %pull func. How do I keep track of the variable name? I could have the python side embed it in the return JSON.

Since any ipython execute is an async call, should make all executes return a deferred? Maybe a deferred that fulfilled it's promise on output?

dalejung commented 11 years ago

moved