You don't seem to have any way of breaking out of this while loop/the interface. Your program will run forever and ever until I give it a keyboard interrupt. I'd like you to add a way of getting out of the loop, with a simple break or exit statement at the appropriate point(s).