dan-da/py2php

Question on py2php

Closed this issue · 1 comments

Dear dan-da,

I am very interested in your script. How does this handle imports ?

Is this only translating python code that does not include any library ?

Congratulations for the tool you built.

How does this handle imports ?

It converts the "import xxxx.py" to "require_once('xxxx.php')". In most/many cases that won't work and you'll need to do the right thing manually.

Is this only translating python code that does not include any library ?

right. it translates one source code file at a time.

If you have the source to the library, it could possibly be translated also.

For all but the simplest cases, additional porting work will be required for each source file, but py2php handles much of the routine grunt work.

Some of the common python builtins are emulated using a php library included with py2php.