processing / processing/libprocessing

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

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Mewnala
Dominant language
Rust
Stars
69
Forks
14
Avg merge
15d 22h
Merged PRs (30d)
3

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in noc-2-mewnala-port/chapter2/Example_2_6_Attraction, where setup defines width and height while Attractor.py and Mover.py access them. Start by tracing how modules in the same directory receive Processing state; done means those modules can access width and height without passing them to their class constructors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.