Event-driven programming

In an algorithm-driven program, the flow of the program is dictated by the predefined steps written in that program. The program may prompt the user with these instructions for an input. An example is a command-line application asking for user input in a predefined order.

In contrast, applications with a graphical user interface let the user dictate the program flow. The application waits for the user actions, and then responds to those actions. For example, if you are reading a PDF copy of a book, you can perform actions like jumping to the next page, zooming-in, scrolling down, or closing the window by clicking on the appropriate buttons. Here, you are essentially telling the application what to do next. This is called ...

Get Learning Python Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.