Skip to content

Unix plus Python 3.0 - FYI #3

@Manamama

Description

@Manamama

I encountered a couple of issues that required code modifications. I’m detailing them below so that they can be addressed for better compatibility:

Print Function Syntax: In Python 3.x, print is a function and requires parentheses around the arguments. The existing code uses the Python 2.x syntax for print statements, which leads to a SyntaxError. For example, print len(squareCenters) should be updated to
print(len(squareCenters)).

File Path Syntax: The code uses backslashes () in file paths, which is not compatible with Unix systems. On Unix systems, file paths should be specified using forward slashes (/). For example, MEDIA\WhitePawn.png should be updated to MEDIA/WhitePawn.png
everywhere (for Linux)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions