New module file_io which takes care of this. All output should go
through file_io.write, which encodes it using the appropriate
character encoding. For output to a temporary file, use "with
file_io.tmpfile('name')".
Moved WorblehatException to new module exc, so all modules can access
it without importing worblehat.
Added encoding from unicode to str in execute_query, and wrote wrapper
functions with decoding for the cursor methods fetchone and fetchall.
This means that from now on, one should never call these methods
directly on cursor objects, but instead call execute_query, fetchone,
fetchall, fetchone_dict or fetchall_dict in util.py.
I plan to separate out this code to a new module (db.py?), and rewrite
it in a way that makes it harder to write things like c.execute by
mistake.
* Kopiert inn noe dokumentasjon (filformat og kommandolinjeargumenter)
fra forrige forsøk (som var i python-katalogen).
* Kopiert implementajonen av filformatet fra forrige forsøk.
* Kopiert nyttige ting fra mdboh, samt noe fra forrige inkarnasjon av
kommandolinjegrensesnittet her, til util.py
* Skrevet litt testkode i worblehat.py.