I want to get my class variables from file x and use them in file y. How can I go about doing this?
I have seen that you would use from fileName import * but when i use this i get a error "import * only allowed at one module level"
I want to get my class variables from file x and use them in file y. How can I go about doing this?
I have seen that you would use from fileName import * but when i use this i get a error "import * only allowed at one module level"
VAR1 = 'foo'
VAR2 = 'bar
from A import VAR1, VAR2
Assuming files A.py and B.py are located in the same folder...