Open halostatue opened 7 years ago
I am also facing same issue
Hi @RutujaWanjari
Sure, see example here:
~/temp/ruby$ cat test_dict.rb
require "rubypython"
RubyPython.start
sys = RubyPython.import("sys")
sys.path.append('.')
my = RubyPython.import("test_dict")
r = my.test_dict
if r == nil
puts("Nil")
else
puts("FAILED")
end
puts(r.to_a.length)
#r.to_enum.each do |key|
# puts(key)
# puts(r[key])
#end
Note, I had a test_dict.py
file in the same folder.
Not sure if it is impossible but is RubyPython able to import a local python module (i.e. test.py within the local directory)? All attempts I have tried yield a ImportError: No module named test