Skip to Content
Software Architecture with Python
book

Software Architecture with Python

by Anand Balachandran Pillai
April 2017
Intermediate to advanced
556 pages
11h 5m
English
Packt Publishing
Content preview from Software Architecture with Python

Event-driven programming

Event-driven programming is a paradigm of system architecture where the logic flow within the program is driven by events such as user actions, messages from other programs, or hardware (sensor) inputs.

In event-driven architectures, there is usually a main event loop, which listens for events and then triggers callback functions with specific arguments when an event is detected.

In modern operating systems such as Linux, support for events on input file descriptors such as sockets or opened files is implemented by system calls such as select, poll, and epoll.

Python provides wrappers to these system calls via its select module. It is not very difficult to write a simple event-driven program using the select module in Python. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Architecture Patterns with Python

Architecture Patterns with Python

Harry Percival, Bob Gregory

Publisher Resources

ISBN: 9781786468529Supplemental Content