I need to translate some Perl scripts into Python.
When I went looking for a tool that would help automate the
translation, I was rather surprised that I couldn't find anything.
BridgeKeeper, the only real candidate that I could find, is no longer
available. There are of course general-purpose parsing packages, but
I'm looking for something target specifically to Perl-to-Python
translation.
Since I couldn't find anything, I've started to write my own.
Preliminary results are good, but before I spend any more time on it I
want to be really sure that I'm not re-inventing the wheel.
Does anybody know of any tools to automate (or assist) Perl to Python
translation? 6 3746 st***@ferg.org (Stephen Ferg) wrote in message news:<b1**************************@posting.google. com>... I need to translate some Perl scripts into Python.
When I went looking for a tool that would help automate the translation, I was rather surprised that I couldn't find anything. BridgeKeeper, the only real candidate that I could find, is no longer available. There are of course general-purpose parsing packages, but I'm looking for something target specifically to Perl-to-Python translation.
Since I couldn't find anything, I've started to write my own. Preliminary results are good, but before I spend any more time on it I want to be really sure that I'm not re-inventing the wheel.
Does anybody know of any tools to automate (or assist) Perl to Python translation?
don't know but there is a book out.
Perl to Python Migration
by Martin C. Brown
Cheers. st***@ferg.org (Stephen Ferg) wrote in message news:<b1**************************@posting.google. com>... I need to translate some Perl scripts into Python.
When I went looking for a tool that would help automate the translation, I was rather surprised that I couldn't find anything. BridgeKeeper, the only real candidate that I could find, is no longer available. There are of course general-purpose parsing packages, but I'm looking for something target specifically to Perl-to-Python translation.
Since I couldn't find anything, I've started to write my own. Preliminary results are good, but before I spend any more time on it I want to be really sure that I'm not re-inventing the wheel.
Does anybody know of any tools to automate (or assist) Perl to Python translation?
My goodness - sounds like quite a project. Now if you could make it
two way that would be really interesting...
Cool.
Fuzzy http://www.voidspace.org.uk/atlantib...thonutils.html
Stephen Ferg wrote: I need to translate some Perl scripts into Python.
When I went looking for a tool that would help automate the translation, I was rather surprised that I couldn't find anything. BridgeKeeper, the only real candidate that I could find, is no longer available. There are of course general-purpose parsing packages, but I'm looking for something target specifically to Perl-to-Python translation.
Since I couldn't find anything, I've started to write my own. Preliminary results are good, but before I spend any more time on it I want to be really sure that I'm not re-inventing the wheel.
Does anybody know of any tools to automate (or assist) Perl to Python translation?
This is a great feat of worth I'll say. I remembered reading somewhere
that Jython uses JavaCC, so perhaps looking in that direction can be of
some help.
PLY is one of the pure python lex/yacc system I can find. There is also
SPARK, but John Aycock had left the university. PLY is partially based
on SPARK.
If this can be worked out, Perl/Python/Java combination is too powerful
to imagine......
Maurice
In article <6e**************************@posting.google.com >,
yaipa h. <ya***@yahoo.com> wrote: don't know but there is a book out. Perl to Python Migration by Martin C. Brown
Not particularly useful.
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/
"A foolish consistency is the hobgoblin of little minds, adored by little
statesmen and philosophers and divines." --Ralph Waldo Emerson
Maurice LING ha scritto: If this can be worked out, Perl/Python/Java combination is too powerful to imagine......
I think you'd be happy with parrot or .net ;)
> Stephen Ferg wrote:
[...] Does anybody know of any tools to automate (or assist) Perl to Python translation?
Perl has a notoriously hairy lexical structure. Maybe the parsing
isn't much fun either. The "only perl can parse Perl" quote (Larry
Wall?) springs to mind. Given that, and working on the assumption
you're sufficiently insane to go through with this project <wink>, I
guess you'd definitely want to do precisely that: use perl to parse
the Perl code.
Bon chance.
[...]
Maurice LING <ma*********@acm.org> writes: If this can be worked out, Perl/Python/Java combination is too powerful to imagine......
:-( I don't think that's a reason for wanting a translator. If you
just want to call Python from Perl, or call Perl from Python, I guess
you'd use pyperl (though I don't know if it's actively maintained).
John This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fred Ma |
last post by:
Hello,
This is not a troll posting, and I've refrained from
asking because I've seen similar threads get all
nitter-nattery. But I really want to make a decision
on how best to invest my time....
|
by: Xah Lee |
last post by:
while programing in Python, one can lookup syntax or info for keywords
or modules within Python.
In the command line, type
python
to get into the python interactive program. then type...
|
by: Xah Lee |
last post by:
© # this is an example of for statement
© # the % symbol calculates the remainder
© # of division.
© # the range(m,n) function
© # gives a list from m to n-1.
©
© a = range(1,51)
© for x in a:...
|
by: Xah Lee |
last post by:
# -*- coding: utf-8 -*-
# Python
# to open a file and write to file
# do
f=open('xfile.txt','w')
# this creates a file "object" and name it f.
# the second argument of open can be
|
by: Xah Lee |
last post by:
© # -*- coding: utf-8 -*-
© # Python
©
© # in Python, one can define a boxed set
© # of data and functions, which are
© # traditionally known as "class".
©
© # in the following, we define a...
|
by: Xah Lee |
last post by:
# -*- coding: utf-8 -*-
# Python
# suppose you want to fetch a webpage.
from urllib import urlopen
print
urlopen('http://xahlee.org/Periodic_dosage_dir/_p2/russell-lecture.html').read()
#...
|
by: Xah Lee |
last post by:
here's another interesting algorithmic exercise, again from part of a
larger program in the previous series.
Here's the original Perl documentation:
=pod
merge($pairings) takes a list of...
|
by: Xah Lee |
last post by:
Sort a List
Xah Lee, 200510
In this page, we show how to sort a list in Python & Perl and also
discuss some math of sort.
To sort a list in Python, use the βsortβ method. For example:
...
|
by: Xah Lee |
last post by:
Split File Fullpath Into Parts
Xah Lee, 20051016
Often, we are given a file fullpath and we need to split it into the
directory name and file name. The file name is often split into a core...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |