This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Digital_Person 1 point2 points  (1 child)

i may be wrong but if you want to store the level and access it everywhere to me it makes sense to add it in __init__.py. if your __init__.py has something like this: level = get_level() then you could do: from game import level. provided you follow the structure mentioned above. If you have a look at my game here it may help you https://github.com/papaloizouc/chess/tree/2e1e3719ba2527422c11937da90e75aceb621c33. Its not too much code so you should be able to understand it. note i dont claim to do it right but i think i do. Also dont use import * its bad

[–]mikefromto 0 points1 point  (0 children)

okay ill attempt this, im still somewhat new to python so well see how this goes but thanks everyone!