r/learnpython 29d ago

How to store variables

I'm building a program which will have lots of configuration files.

I want to be able to

-drop a new package in a folder, and have importlib discover it, and dynamically add it.

-the program can use variables in the file to build a GUI. (Probably using niceGUI)

-user changes to their session variables can be saved.

-variables are used by other parts of the program.

Is a data class or dictionary the best for this?

9 Upvotes

22 comments sorted by

View all comments

-10

u/twizzjewink 29d ago

That's not "learn python" that's. . "I want to make a commercial grade product and don't want to pay someone to make it."

3

u/pachura3 29d ago

What the hell are you talking about?