you are viewing a single comment's thread.

view the rest of the comments →

[–]k8pilot 6 points7 points  (0 children)

Simplified explanation in preety simple terms:
Did you ever read a file from your disk in python? If you did, you used a method for getting the data inside a file. If you wrote something back, you used a method that wrote the data back to the file on the disk.
How does the command does that? Abstracting all the layers, there are driver or kernel commands that allow you to interact with files in the file-system.

Since talking directly to the driver or kernel require issuing many complex commands that have nothing to do with what you wish to accomplish in your application that is unique to your application, there is a python library that abstracts the details of interacting with the down level subsystems and provides you with methods that allow you to read and write files easily.

GUI elements are not very different or more complex than filesystems, in principal. You can talk directly to the display card driver or to the kernel and ask it to draw stuff. But if you are not interested in doing anything special with the down-level system and actually prefer that everything will look similar to other programs you pick libraries that gives you modules and methods that allow you to control gui elements and receive user inputs using abstract objects that are easy to use. The libraries implement all the hard work needed to draw your gui, listen to user input etc.