Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.

UPDATE: MVC (model-view-controller) is very natural approach for Tkinter (as is the case with other GUI frameworks). Please, take a look at toy MVC (link from an answer to http://stackoverflow.com/questions/7638139/python-tk-with-mvc-patternhttps://stackoverflow.com/questions/7638139/python-tk-with-mvc-pattern)

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.

UPDATE: MVC (model-view-controller) is very natural approach for Tkinter (as is the case with other GUI frameworks). Please, take a look at toy MVC (link from an answer to http://stackoverflow.com/questions/7638139/python-tk-with-mvc-pattern)

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.

UPDATE: MVC (model-view-controller) is very natural approach for Tkinter (as is the case with other GUI frameworks). Please, take a look at toy MVC (link from an answer to https://stackoverflow.com/questions/7638139/python-tk-with-mvc-pattern)

update
Source Link
Roman Susi
  • 963
  • 8
  • 11

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.

UPDATE: MVC (model-view-controller) is very natural approach for Tkinter (as is the case with other GUI frameworks). Please, take a look at toy MVC (link from an answer to http://stackoverflow.com/questions/7638139/python-tk-with-mvc-pattern)

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.

UPDATE: MVC (model-view-controller) is very natural approach for Tkinter (as is the case with other GUI frameworks). Please, take a look at toy MVC (link from an answer to http://stackoverflow.com/questions/7638139/python-tk-with-mvc-pattern)

Source Link
Roman Susi
  • 963
  • 8
  • 11

Tkinter is not just OOP, it's about http://en.wikipedia.org/wiki/Event-driven_programming . The code you posted does not yet show enough to be judged, because it's too small and the application purpose is not yet clearly visible. When code will grow, you will need to decompose it into modules, but it is good to think about the strategy before hand.

Tkinter allows to process events in event-driven style, so it's hard to see why do you need "a tick" to check if a user presses something. (I am not sure, may be it is intended this way).

One more note I can make is about style. Take alook at http://www.python.org/dev/peps/pep-0008/ It's not very important, but makes the code look much nicer.