Globals.py
dynamicValue = ''
staticValue = 'This is a string'
Controller.py
import Globals.py
print('The static value is: %s' % Globals.staticValue))
>> The static value is: This is a string
someValue = 'i can assign this value to dynamicValue'
Globals.dynamicValue = someValue
print('The dynamic value is: %s ' % Globals.dynamicValue))
>> The dynamic value is: i can assign this value to dynamicValue
I'm able to maintain all my variables that I will need to use across various methods and files this way and it has been working like a charm. I was wondering why I don't see this approach mentioned though.. Is this bad practice?