Perl -> Python hopeless?

Trent Mick trentm at ActiveState.com
Fri Jul 18 15:55:10 EDT 2003


[Helmut Jarausch wrote]
> Hi,
> having been a Perl fan for years I have nearly converted to Python.
> Still, there are LOTS and very good modules written in Perl.
> 
> Is there a tool to lesson the burdon of translation of Perl to Python?
> I am completely aware of the fact that a fully automatic translation
> to readable Python source is hard if not impossible.
> But such a tool could lots of the tedious work like replacing
> braces by proper indentation and and similar things.
> 
> Thanks for a pointer (if there is one)

There is a project called PyPerl that was developed here at ActiveState
to help integrate Perl support into Zope. Here is a wiki for PyPerl:
    http://www.python.org/cgi-bin/moinmoin/PyPerl

Try this (YMMV):
    - install ActivePython 2.2
    - install ActivePerl 5.6
    - install PyPerl into your Perl and Python installations:
        pyppm install PyPerl
    - startup python and try to use the 'perl' module:
        python
        >>> import perl
        >>> print perl.eval("3+3")
    - read some docs on how to use it:
        http://aspn.activestate.com/ASPN/CodeDoc/pyperl/perlmodule.html


I can't test this on my machine right now so I can't be sure that the
above works smoothly.

Cheers,
Trent

-- 
Trent Mick
TrentM at ActiveState.com





More information about the Python-list mailing list