oh god how did this get here I am not good with computer

I threw your code into a class, but have not tested it. Have a look at it, and merge it back in if you like! I may have screwed up your indentation.

Here's my original commit statement:

not sure if this even works, but I hope it makes sense. I threw it
together real quick, so it probably needs work to iron out typos and
make it look like how you like. log_callback could be a print-like
function as shown, or something that throws the text to a gui, or
whatever you like. might want to move the keyboardinterrupt outside the
class, too