I want to put my Python code in Ruby Module and run it, but I don't know how to import the Python stand-alone script into Ruby. The following are my code:
Python code
import ystockquote
import pprint
pprint.pprint(ystockquote.get_all('GOOG'))
Ruby
module PythonInRuby
require "rubypython"
RubyPython.start # start the Python interpreter
cPickle = RubyPython.import("cPickle")
p cPickle.dumps("Testing RubyPython.").rubify
RubyPython.stop # stop the Python interpreter
The problem is that between the RubyPython.start and RubyPython.stop, I don't know how to import the Python file. And another problem is what the code is for running Ruby in this module?