I am creating my global variables within my Main.py and trying to update through a function located in my States.py
The targeted code in my Main.py looks like so:
#!/usr/bin/env python
#
import States #Import created states.py
global rad
States.Update_var()
leway = 2.00/rad
And my States.py looks like so:
def Update_var():
global rad
rad = 180.000001/3.1415926
But when I run the code the rad variable doesn't update to the new value and I receive an error:
NameError: global name 'rad' is not defined
I am relitively new to python and just finding my feet so any help would be great. Thanks