I have been told that doing this would be a not-very-good practice:
SOUNDENABLED = 1
FILEPATH = \'D:\\\\TEMP\\\\hello.txt\'
Importing a module executes any code that it contains. Nothing restricts your configfile.py
to containing only definitions. Down the line, this is a recipe for security concerns and obscure errors. Also, you are bound to Python's module search path for finding the configuration file. What if you want to place the configuration file somewhere else, or if there is a name conflict?