I would like to write dictionaries with UTF-8 strings to a file. I saw another thread about printing utf-8 strings with pprint, and tried to modify the code seen there like this
MyPrettyPrinter().pprint(dict, stream=f)
but it is not working. I have no experience in classes in python, so I have no idea what to redefine in the pprint library.