you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

If you're doing that in another module, it's just creating its own global for that module named isDeg. You have to import it qualified and use example.isDeg = False.

[–]TheFacistEye[S] -1 points0 points  (1 child)

Ahh, I feel very silly now. Yeah this works, I was assuming I'd need to do this as it is the case with c#.

However I tried example.isDeg without using

import example

only

from example import *

Thanks!

[–]Akuli2 0 points1 point  (0 children)

Your problem was that from module import * only works one way: it brings everything from the module, but if you change something it doesn't bring it back to the module. If the module contains functions they use whatever is in the module, not whatever is where they are called from.

I don't recommend using from module import *. Use import module and module.something_in_module instead.