How to implement the MVC-pattern in Tkinter

user618677 picture user618677 · Oct 3, 2011 · Viewed 19.7k times · Source

I need a basic example where MVC pattern is used with Python TK. I have some code using Tkinter, however I would like to transform it using the MVC pattern.

Answer

ajfigueroa picture ajfigueroa · Jun 21, 2013

I know this is quite old but I was able to find some decent examples using the MVC pattern with both Tk and wxPython, hopefully they provide some help for anyone stumbling upon this question.

wxPython: http://wiki.wxpython.org/ModelViewController

Tk: http://tkinter.unpythonic.net/wiki/ToyMVC This website no longer exists so I've hosted the code on a Gist here.