Pygame vs tkinter.

I searched the Internet and read about developing GUIs in Python and read that Tkinter is one of the best GUI tools for Python. But I also know that Pygame is a library that can be used for a graphical interface. Since I'm fairly new to programming, someone, please explain the differences between Pygame and Tkinter and which should be used in this case. What would be the best choice for a graphical interface of a chess engine. Thank you very much in advance.

+6
source share
1 answer

First off, tkinter is definitely not the best GUI toolkit for python. This is one of the easiest and usually comes with a python interpreter. But it is not as strong as Qt, wx or Gtk.

pygame is - as the name says - a package that makes it easy to create games in python, rather than creating graphical interfaces. Thus, it provides event processing, graphic sound bindings and some other useful for writing games, and it is written on top of the SDL .

So, if you want to write a GUI application, do not use pygame.

On the other hand, GUI tools can also be used to write games. In general, I would say that they are much more universal than something like pygame, but they are not very comparable. It all depends on the application you want to write. Choosing the right tool is usually something very important.

+3
source

Source: https://habr.com/ru/post/916168/


All Articles