Ruby to Python communication

People,

I have written a little Ruby script to restore information on video/
audio files in a Miro dir structure to a Miro database - the main thing
I can’t do is to find the feed for particluar directories eg the dir:

This-American-Life

has a feed:

http://feeds.thisamericanlife.org/talpodcast

but you can’t find out what this will be from the stored videos. One of
the Miro developers has suggested:

“You could probably write a Python command line script that does what
you need it to do by using Miro as a library. Then your Ruby script
could invoke your Python script to get the name of the feed.”

Are there any examples around of Ruby communicating with Python?

Anyone got a simple example that would get me started?

Thanks,

Phil.

On Fri, Apr 23, 2010 at 7:06 PM, Philip R. [email protected]
wrote:

    http://feeds.thisamericanlife.org/talpodcast
Anyone got a simple example that would get me started?

Thanks,

Phil.

You can get the output of a python script (or any command line
program) from ruby like this:

output = script.py
(or, to specifically call the interpreter)
output = python script.py

This will put anything script.py sends to stdout in the ‘output’
variable.

-Jonathan N.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs