[BioRuby] Import Python modules in Ruby...
Sharvari Gujja
sgujja at broad.mit.edu
Tue Jun 16 15:14:07 UTC 2009
Hi,
I'd like to know if there is a way to import Python modules into Ruby. I
downloaded the Ruby/Python library to embed the Python interpreter.
However on running the script I get an error saying:
*C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- python (LoadError)
from C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from Z:/ruby_progs/test2.rb:1*
I extracted "python" library at C:/Program
Files/ruby/lib/ruby/site_ruby/1.8/ . [My ruby version is 1.8.6]
The script I am trying to run is :
#!/usr/bin/env ruby
require 'rubygems'
require 'python'
require 'python/naming'
require 'python/xreadlines'
distance = naming.DISTANCE_TOOL.distance("protein 1", "protein2")
print distance
Could someone please help.
Thanks
S
More information about the BioRuby
mailing list