I have two modules:
constants.py
def define_sizes(supersample):
global SUPERSAMPLE
global WIDTH
global HEIGHT
global LINE_WIDTH
SUPERSAMPLE = supersample
WIDTH = 1280*SUPERSAMPLE
HEIGHT = 854*SUPERSAMPLE
LINE_WIDTH = 1*SUPERSAMPLE
define_sizes(1)
test.py
from constants import *
print(WIDTH, HEIGHT, LINE_WIDTH)
# Draw something
define_sizes(4)
print(WIDTH, HEIGHT, LINE_WIDTH)
# Draw the same thing, but bigger
The result is:
1280 854 1
1280 854 1
I would expect to get:
1280 854 1
5120 3416 4
Why is that? What am I missing? Can I fix it to give expected results?