I am making a game, a simple 2d RPG in python, using pygame. I'm now adding zooming in and out using the scrollwheel. I have a file called stuff.py along with my main.py file and a bunch of other files (player.py, enemy1.py, enemySpawner.py, chest.py etc.). In the stuff.py file, I have an int called sizeofEverything, and everything is scaled ( square shape) to sizeofEverything. Main.py  is the only file that is executed, so In main.py, I detect if the scrollWheel has been interacted with, and if it has been, I want to change sizeofEverything. The problem is, that would just change the local copy of sizeofEverything that I imported into main.py .I need some way to change it, from the main.py file, so that it also updates in all the other files (enemy1.py, player.py etc. ) How would this be done?
Create a config module specifically which defines your global variables e.g. config.py
Import this module into each of the files which need access to the global.
Globals between files in python