Forgot to CC ilug.
---------- Forwarded message ----------
From: Rory Browne <rbmlist at gmail.com>
Date: 6 January 2012 10:02
Subject: Re: [ILUG] Maybe Daft Question 99% Probability. Ruby on Python?
To: Frank Murphy <frankly3d at gmail.com>
I'm not going to say it can't be done, but it's not something you're
going to do cleanly, and unless you've got a very good reason to do
otherwise, you're probably best to using Python if you're using a
Python Framework, or if you want to write in Ruby, then switch to a
Having that said, there are ways to call functions in one language
from another. A simple ( and inefficient ) way to do this would be to
just execute the interperter with the correct arguments. Eg to call a
function from a Perl module you could execute "perl -MSomeModule.pm -e
RPC/IPC would be another possibility where you run your ruby code in a
separate process ( except in this case a long-lived process ), and
communicate with it telling which function you want called, and it
would respond with the functions output.
Another possibility I've seen in embedding a Ruby interpreter in the
Python Interpretor. I haven't seen ( uncle Google may help here ) any
case of this for Python and Ruby, but here is a list of addons for PHP
which support writing code in other languags.
Having that said, unless you have a good reason ( and IMO preference
for one language isn't good enough ), this isn't a rabbit hole you
want to go down.
On 5 January 2012 19:17, Frank Murphy <frankly3d at gmail.com> wrote:
> I know it can be written Python,
>> But, can one code an app say in Ruby,
> to run on a python framework?
> (Django, turbogears, genshi )
>> Or indeed code a website app in any language,
> to do so?
>> Apologies I havn't mananged to make,
> a sensible search string for Google.
> Just returns Python vz Ruby
>> Frank Murphy
> UTF_8 Encoded
> Friend of fedoraproject.org
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug> Who we are : http://www.linux.ie/> Where we are : http://www.linux.ie/map/
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!