2022-11-20 13:08:05 Ok, so I've refined the part of the pseudocode that will be the script that runs on the master and slave canisters (one instance of it for each drive). Once I finalize that and get it working, I'll be able to manually move work through the system, with me playing the role of the "controller." The controller software will be a little more involved, and that's where the Python / urwid stuff will come in. But 2022-11-20 13:08:07 I'll be able to do production work with just this easy part with a level of effort similar to what I invest now. 2022-11-20 15:54:53 dave0: Are you doing anything in particular with the Z80, or just reading up? 2022-11-20 20:54:19 So, Python advice question, if any of you have worked with it. For this controller, I want to be able to do very good recovery from failure events (think power failure). So, at appropriate times I will have the controller serialize all of its data, which will reside in a single integrated data structure, to disk. I'll include a hash for integrity checking. Then I'll be able to "restart" and it will read 2022-11-20 20:54:21 the structure back in and pick up where it left off. The master and slave will keep all of their important data in files referenced by bash. 2022-11-20 20:54:36 So, any reason to prefer json vs. pickle for that serialization / deserialization? 2022-11-20 20:54:59 I lean toward json because it's human readable, but if pickle has some other advantage it might outweigh that for me. 2022-11-20 20:55:25 I have more experience with json too, and it's just so damn easy to use. 2022-11-20 20:56:40 I'm going to keep the last several serializations around, so that if the latest fails hash check I can just drop back to the one before that. At worst it will just cause me to re-run a test step I otherwise wouldn't have to. 2022-11-20 21:50:57 Oh my - there is an extension of pickle, package dill (people are so cute). 2022-11-20 21:51:13 It is explicitly designed to be able to save and restore entire interpreter sessions. 2022-11-20 21:51:25 dill.dump_session() 2022-11-20 21:51:29 and you're done. 2022-11-20 21:52:15 So all I have to do is write this so that the initial value of a state variable determines where in the logic the thing kicks off, rather than just "proceeding from an entry point." 2022-11-20 21:52:58 It'll always enter the "big loop" from the top, but variables will control what it actually does. 2022-11-20 21:53:46 Then once that's working, the next step will be to arrange for it all to start on system power-up automatically. 2022-11-20 23:32:13 Hey, did you guys know that if you 'import code' in Python, t hen anywhere in your program you can run code.interact() and it will pitch you into an interactive Python console? Ctrl-D takes you back to your proram. 2022-11-20 23:33:12 if you pass local=locals() as the parameter string, I think you can then query your local variables around the call, though I haven't actually tried that yet.