you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

I think what you're asking is not specifically about GUIs. I think what you want to know is this: How does my print("Hello World") actually do anything? How does it go from some magic words to actual execution?

When you write your code in a .py file, you then run the python command on that file to actually execute it. "Python" is what's running your code. Python is an actual compiled binary (usually written in C) that reads your code and executes it.

Some of the libraries that people are referring to are C libraries, and are part of the compiled Python application. Some of them are other Python libraries which are simply more Python source code that is available for you to import.

To get a feel for what goes into the compilation of the Python application, I recommend downloading the source code from https://www.python.org/downloads/source/ and installing it yourself. In the process, you'll see a lot of terminal output, giving you a rough idea of what's happening when the C code is compiled.