Ruby to Python communication

P

Philip Rhoades

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.
_______________________________________________
develop mailing list
(e-mail address removed)
http://mailman.pculture.org/listinfo/develop
 
J

Jonathan Nielsen

People,

I have written a little Ruby script to restore information on video/ audi= o
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:

=C2=A0 =C2=A0 =C2=A0 =C2=A0This-American-Life

has a feed:

=C2=A0 =C2=A0 =C2=A0 =C2=A0http://feeds.thisamericanlife.org/talpodcast

but you can't find out what this will be from the stored videos. =C2=A0On= e 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. =C2=A0Then your Ruby script cou= ld
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.

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

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

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

-Jonathan Nielsen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,069
Latest member
SimplyleanKetoReviews

Latest Threads

Top