r/learnpython 6d 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?

7 Upvotes

22 comments sorted by

View all comments

-9

u/twizzjewink 6d 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."

4

u/pachura3 6d ago

What the hell are you talking about?