0

I have scripts which need different configuration data. Most of the time it is a table format or a list of parameters. For the moment I read out excel tables for this. However, not only reading excel is slightly buggy (excel is just not made for being a stable data provider), but also I'd like to include some data validation and a little help for the configurators so that input is validated partially. It doesn't have to be pretty though - just functional. Pure text files would be to hard to read and check.

Can you suggest an easy to implement way to realize that? Of course one could program complicating web interfaces and form, but maybe that's too much effort?!

Was is an easy to edit way to provide data tables and other configuration parameters? The configuration info is just small tables with a list of parameters or a matrix with mathematical coefficients.

2
  • Not clear from your question: are you looking for a GUI editor for the files, or a file format which is easy to program against? Commented Apr 10, 2012 at 12:00
  • Any solutions which makes it easy to provide configuration. Ideally something for colleagues which aren't programmers. I suppose something that comes close to a GUI editor, but is still wouldn't take too long to program for me. Editing YAML is an OK start, but for that the colleagues would need to obey the YAML syntax. Commented Apr 10, 2012 at 12:09

2 Answers 2

1

I like to use YAML. It's pretty flexible and python can read it as a dict using PyYAML.

Sign up to request clarification or add additional context in comments.

Comments

1

Its a bit difficult to answer without knowing what the data you're working with looks like, but there are several ways you could do it. You could, for example, use something like csv or sqlite, provided the data can be easily expressed in a tabular format, but I think that you might find xml is best for your use case. It is very versatile and can be easy to work with if you find a good editor (e.g serna or oxygenxml), however, it might still be in your interests to write your own editor for it (which will probably not be as complicated as you think!). XML is easy to work with in python through the standard xml.etree module, and XML schemas can be used for validation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.