-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to bind to a ruby kernel #2643
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from subprocess import Popen | ||
|
||
from IPython.zmq.kernelmanager import KernelManager | ||
|
||
def launch_ruby_kernel(fname='cf.json', **kw): | ||
cmd = ['iruby_ruby', '~/iruby/lib/kernel.rb', fname] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Obviously, we will need to make these |
||
cmd = ['/usr/local/Cellar/ruby/1.9.3-p286/bin/ruby', | ||
'/Users/matthiasbussonnier/iruby/lib/kernel.rb', | ||
fname] | ||
#~/.ipython/profile_default/security/kernel-10234.json | ||
return Popen(cmd) | ||
|
||
class RubyKernelManager(KernelManager): | ||
def start_kernel(self, **kw): | ||
kw['launcher'] = launch_ruby_kernel | ||
return KernelManager.start_kernel(self, **kw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really need to be imported here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you're right.