Idle thread (Polling) python GUI and saving program state

Rolando abhishek1899 at gmail.com
Mon Mar 3 20:33:15 EST 2014


I have a GUI with a bunch of cells which is my "View" in the MVC design. The user enters some information in the view and I pass this on to the model so that using the information entered by the user it(model) can do some processing.

I have coded up my model as a state machine. Wherein, once a function is complete it switches to the next state and so on.

I want to know how do I save the program state between restarts. Basically, I'm trying to handle a scenario wherein if someone closes the program. The next time someone starts it up, it should start from where it left off (both the view and model)

Also, I want to setup a poll method where once in a while I can poll each cell to know the state it is in. How do I do this? I don't want my GUI to hang when I'm doing anything. It will be great if someone could help. Thanks!



More information about the Python-list mailing list