The scripts in util/locale_database/ could be significantly improved:
- When something goes wrong, I can't import the script as a module and investigate what's going wrong in an interactive python session: importing the script runs it. It should define suitable classes and functions, then use an if _name_ == '_main_' block at the end to actually run the script.
- cldr2qlocalexml.py prints its output (i.e. writes it to sys.stdout), rather than taking the name of a file to which to write the output. Given that it also grumbles extensively on sys.stderr, this only makes sense if one is redirecting stdout to a file; and I've had to kludge the script to ensure sys.stdout.encoding is UTF-8, since it's apt to be None and mean ASCII, to which some of our data can't be encoded. So it would be better to write to a file named on the command-line (we can continue the time-honoured tradition of letting - as output-file mean write to stdout, and/or continue writing to stdout if no output file is specified) instead of printing.
- Everything needs to be fed to six and converted to python3, as it's currently all python2; it might also be constructive to add mypy type annotations to it.