I have a package containing many .py files.
I want to:
- have a debug flag, which I can access in each file. (Actually write it in one file, read it in all other files)
- have a version number in each file, which is individual for each file. But I would like to create one function to get all version numbers of all files.
How do I define variables in these cases? How do I use import?
Edit: I use an empty __init__.py file and:
in package/classes.py:
debug = False
in package/db.py:
from package.classes import *
print debug