Skip to content

width & height are not accessible as globals across imported Python modules in the same directory #162

@ekkezia

Description

@ekkezia

Unlike in Processing tabs that exist in the same folder, different Python modules in the same directory does not share width and height information. width and height have to be imported to the Class constructor for now as a workaround.

Example:
noc-2-mewnala-port > chapter2 > Example_2_6_Attraction

  • width and height are declared in Example_2_6_Attraction.py setup
  • Attractor.py and Mover.py are also trying to access width and height
    Note that there is no error anyway if we try to run the sketch without providing width and height to the Classes, but it isn't exposed to modules outside the one that has size(width, height) in the setup

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions