Convert python script in ruby

No, mine is a purely syntactic translator based on regular expressions,
with some domain-specific ones that know how to convert from particular
Python package usages (including translating “import” to “require”
statements). Nothing as interesting as yours, but it does the tedious
majority of the translation I needed for seeing if I could port FIT from
Python to Ruby (easier than Java to Ruby, I felt).

I would be happy to share my script, though it’s not on the machine I’m
emailing from this moment, so please remind me to send it.

Al

···

-----Original Message-----
From: Robert Feldt
Sent: Fri 2/28/2003 11:00 PM
To: ruby-talk ML
Subject: Re: Convert python script in ruby

On Sat, 1 Mar 2003, Albert Chou wrote:

I’ve been working on a Ruby script that does a great deal of the
translation from Python to Ruby, but it’s by no means a complete
solution, and I don’t know whether it ever will be.

Interesting, do you have a Python parser in there?

I have the starts of a python-to-ruby translator in Python (don’t throw
rotten tomatoes please, I wanted to check it out). Its very simple to do
that in Python since they export an API to the internal parser so you
get
a full Python parser with AST representation “for free” (hint, hint matz
and I know you have it in the TODO).

I think our community would really benefit from such a tool; when we
find
some extension they have that we want the tool would give a head start
in
translating.

If your tool is close to complete I don’t want to put more effort into
mine. It was really just a hack I did when checking out Python. Is there
a
way we can join forces and get something more complete faster?

Regards,

Robert Feldt