File: mainloop.rst

package info (click to toggle)
paperwork 2.2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 166,660 kB
  • sloc: python: 44,775; makefile: 992; sh: 625; xml: 135
file content (21 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Mainloop plugins
================

Most GUI applications need a main loop. A main loop is a thread dedicated
to running callbacks provided by other threads (or stacked before the main loop
is started).

Depending on the environment in which you're working, you may need different
mainloop implementations. For instance, Python 3 provide main loop support
through `asyncio`. If you're working in a GTK environment, you will have to
use the GLib mainloop instead. Openpaperwork_core provides an implementation
that uses Python 3's `asyncio` module.

More advanced main loops may provide features such as waiting for an event to
occur on a file descriptor. The main loop interface provided here is kept
simple so it can easily be implemented for any other platforms.


.. automodule:: openpaperwork_core.mainloop_asyncio
   :members:
   :undoc-members: