dan-da / py2php

py2php is a utility that will auto-translate python code into PHP code.
GNU General Public License v2.0
98 stars 32 forks source link

SyntaxError: invalid syntax #12

Open cja-github opened 4 years ago

cja-github commented 4 years ago

Hi,

I'm trying to run this on Windows 10 but get this error:

python py2php converttophp.py File "py2php", line 1426 print "PAREN: " + str(x) ^ SyntaxError: invalid syntax

The arrow is pointing at the " before PAREN.

I can send you my input file by a private method. I don't want to send it to this website.

sriteja777 commented 4 years ago

It is because of python version. The code is compatible with python2 but the python version you are using is python3

ostheperson commented 4 years ago

How exactly do you run the script?