4 ms·
You are correct, that is the simplest way. What did I not disclose in the article is that I also wanted somehow to name data. I wanted this because I also kno
by sasa_buklijas 9y ago
You are correct, that is the simplest way.
What did I not disclose in the article is that I also wanted somehow to name data.
I wanted this because I also know that in the configuration file, expect IP addressed I will also need to store sleep duration.
I just find it more articulated if I also have a name for data.
Now I use https://github.com/pasztorpisti/json-cfg https://github.com/pasztorpisti/json-cfg for storing configuration as JSON. json-cfg has the ability to add comments to JSON file.
- jimnotgym 9y agoCould you not do exactly the same but with a python dictionary rather than a list?
- sasa_buklijas 9y agoI was distributing my Python code as EXE, so use of Python code as configuration was not possible. Altho, I think that Python code as the configuration is a good solution if you are executing source code, and only developer (not average user who does not know what Notepad is) will edit it.
- UncleEntity 9y agoI'm confused... You're building a custom configuration file format for people who don't know how to edit configuration files? And, as they say, "xml is like violence..."
- sasa_buklijas 9y agoI had to distribute my Python program as EXE because Windows PC where the program needs to be executed did not have Python installed. That is why using Python as configuration file was not possible. Hope that I have explained it well.