Skip to content

Use of Python 2 shebangs for Python 3 sources #281

@kosarev

Description

@kosarev

On my seemingly standard Ubuntu setup running the .py files in the root of the repository ends with the following. The problem seems to be that they actually call the Python 2 interpreter whereas the sources look to be in Python 3. Replacing python with python3 seems to resolve the problem.

$ ./zxb.py
Traceback (most recent call last):
  File "./zxb.py", line 16, in <module>
    import api.optimize
  File "/home/kosarev/labs/kosarev/github/zx/lab/repos/boriel/zxbasic/api/optimize.py", line 4, in <module>
    from ast_ import NodeVisitor
  File "/home/kosarev/labs/kosarev/github/zx/lab/repos/boriel/zxbasic/ast_/__init__.py", line 4, in <module>
    from .ast import Ast
  File "/home/kosarev/labs/kosarev/github/zx/lab/repos/boriel/zxbasic/ast_/ast.py", line 13, in <module>
    from .tree import Tree
  File "/home/kosarev/labs/kosarev/github/zx/lab/repos/boriel/zxbasic/ast_/tree.py", line 105
    yield from i.inorder()
             ^
SyntaxError: invalid syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions