https://docs.python.org/3/library/pickle.html#pickle-protocol https://stackoverflow.com/questions/1939058/simple-example-of-use-of-setstate-and-getstate It would be useful to read/write these to disk.