Moving from PHP to Python. Is it Possible

r0g aioe.org at technicalbloke.com
Mon Dec 14 04:59:43 EST 2009


Bruno Desthuilliers wrote:
> Sancar Saran a écrit :
> (snip)
>> My problem is with PHP syntax and performance.  I'm just trying to
>> replicate my recepies in python...
> 
> Python is not PHP, and trying to write PHP in Python won't buy you much
> except pain and frustration.


I think people are being a little harsh here. Replicating exactly what
PHP code does on a micro level i.e. line by line is probably a bad idea
but for all we know a lot of the macro level stuff might be fine, or
mostly fine i.e. structures, algorithms, classes and functions etc.

If this is the case rewriting the same bits in Python might not be
painful and frustrating, indeed seeing how much terser those things can
be written in Python would probably be quite satisfying.

Of course, some PHP is never going to port well but you can't say for
sure without seeing it.

Roger.



More information about the Python-list mailing list