Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SyntaxError: invalid syntax in zxb.py (Resolved)
#1
I've just downloaded ZX BASIC from the zxbasic-latest-version.zip link to give it a try. I have Python 3.1.2 installed on a Windows 7 box.

Running zxb.py gives the following error:-

Code:
File "C:\Users\Chris\speccy\zxbasic\zxb.py", line 60
    print m # IGNORE # line directives as PASMO does not support them
          ^
SyntaxError: invalid syntax

I guess I must be doing something wrong, but what?

EDIT: Resolved. I uninstalled Python 3.1.2 and installed Python 2.6 instead. The zxbasic website says "you will need the python interpreter version 2.5 or higher installed on your system" - this should probably be amended to point out to non-python programmers (like me) that actually Python 3.x is no good as it's not backwardly compatible with v2.x.
Reply
#2
ccowley Wrote:I've just downloaded ZX BASIC from the zxbasic-latest-version.zip link to give it a try. I have Python 3.1.2 installed on a Windows 7 box.

Running zxb.py gives the following error:-

Code:
File "C:\Users\Chris\speccy\zxbasic\zxb.py", line 60
    print m # IGNORE # line directives as PASMO does not support them
          ^
SyntaxError: invalid syntax

I guess I must be doing something wrong, but what?

EDIT: Resolved. I uninstalled Python 3.1.2 and installed Python 2.6 instead. The zxbasic website says "you will need the python interpreter version 2.5 or higher installed on your system" - this should probably be amended to point out to non-python programmers (like me) that actually Python 3.x is no good as it's not backwardly compatible with v2.x.

That's right. The .zip or tar.gz versions (.py source codes) still need python 2.6.x. If you're under windows, you can try the .msi version (which does not require any python interpreter).

I also suggest you to download 1.2.6-rxxx. It's a beta, but it fixes many bugs already found in 1.2.5, and also you can contribute the compiler reporting bugs. :wink:
Reply
#3
Isn't THAT interesting. Python supports version 2.6.5 AND version 3.1.2.

How bizarre to have effectively two similar-but-different programming languages. I suppose they are expecting people to move to python 3 eventually. It does warn on the python site, though:

Python Wrote:If you don't know which version to use, start with Python 2.6.5; more existing third party software is compatible with Python 2 than Python 3 right now.

And:

Python Wrote:Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever intentionally backwards incompatible Python release.
So now I DO know something about Python. They are doing some weird paradigm shift, and starting to lose support for older apps...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)