<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
D'Arcy J.M. Cain a écrit :
<blockquote cite="mid:20090508113720.06d4a48e.darcy@druid.net"
 type="cite">
  <pre wrap="">On Fri, 08 May 2009 17:19:13 +0200
Pascal Chambon <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:chambon.pascal@gmail.com"><chambon.pascal@gmail.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">That's funny, I was precisely thinking about a php to python converter, 
some weeks ago.
Such a tool, allowing for example to convert some CMS like Drupal to 
python, would be a killer app, when we consider the amount of php code 
available.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'm not a big fan of PHP but I don't understand the desireability of
such a tool.  If you have a good PHP app just run it.  The point of
Python in my mind is that it is a cleaner syntax and promotes better
code.  Anything that converts PHP to Python is going to leave you with
some butt-ugly Python.  It also risks adding new bugs.

If you want a Python version of Drupal then perhaps that is the project
that you want to start.  Start fresh using the existing project as your
requirements specification.  Don't automatically import all their
coding choices that may be partially based on the language used.

  </pre>
</blockquote>
I agree that, in any way, the code resulting from this translation
would be anything but pythonic :p<br>
<br>
The point would rather be to consider code translated from php, ruby,
perl or anything as extension modules, which have to be wrapped with
pythonic interfaces (much like c/c++ libraries actually), or which are
supposed to be deeply refactored.<br>
It's always a pity when libraries available in a language have
to be reproduced in another - even though building the translation
tools would maybe ask for too much effort.<br>
<br>
Concerning applications, like Drupal, it'd be different of course - I
have no precise plan on how Drupal could be translated and then made
"maintainable" in python, but for sure Python lacks a similar CMS,
easier to approach than Plone and much more feature-full than others
(Slemetonz, Pylucid...). And I don't feel quite ready for implementing
such a thing myself ^^<br>
<br>
Maybe the translation approach isn't the right one ; surely the best
would be an interoperability at a lower level, like we have in Jpype,
the DLR of .Net, Parrot, ironclad etc... but even with those projects,
we're far from a fluent interoperability between languages, which would
allow you to pick the best modules in the languages that fit the most
for each of your tasks, on the platform you want  (I guess that's just
a geeky dream).<br>
<br>
Regards, <br>
pascal<br>
<br>
<br>
</body>
</html>