@@ -11,7 +11,7 @@ Interactive figures and asynchronous programming
1111
1212Matplotlib supports rich interactive figures by embedding figures into
1313a GUI window. The basic interactions of panning and zooming in an
14- Axes to inspect your data is ' baked in' to Matplotlib. This is
14+ Axes to inspect your data is " baked in" to Matplotlib. This is
1515supported by a full mouse and keyboard event handling system that
1616you can use to build sophisticated interactive graphs.
1717
@@ -54,7 +54,7 @@ user hits the 'z' key, please run this other function". This allows
5454users to write reactive, event-driven, programs without having to
5555delve into the nitty-gritty [#f3 ]_ details of I/O. The core event loop
5656is sometimes referred to as "the main loop" and is typically started,
57- depending on the library, by methods with names like ``_exec ``,
57+ depending on the library, by methods with names like ``exec ``,
5858``run ``, or ``start ``.
5959
6060
@@ -83,7 +83,7 @@ for user input and lets us register functions to be run when that
8383happens. However, if we want to do both we have a problem: the prompt
8484and the GUI event loop are both infinite loops that each think *they *
8585are in charge! In order for both the prompt and the GUI windows to be
86- responsive we need a method to allow the loops to ' timeshare' :
86+ responsive we need a method to allow the loops to " timeshare" :
8787
88881. let the GUI main loop block the python process when you want
8989 interactive windows
@@ -109,7 +109,7 @@ Blocking the prompt
109109
110110
111111The simplest "integration" is to start the GUI event loop in
112- ' blocking' mode and take over the CLI. While the GUI event loop is
112+ " blocking" mode and take over the CLI. While the GUI event loop is
113113running you cannot enter new commands into the prompt (your terminal
114114may echo the characters typed into the terminal, but they will not be
115115sent to the Python interpreter because it is busy running the GUI
@@ -147,7 +147,7 @@ While running the GUI event loop in a blocking mode or explicitly
147147handling UI events is useful, we can do better! We really want to be
148148able to have a usable prompt **and ** interactive figure windows.
149149
150- We can do this using the ' input hook' feature of the interactive
150+ We can do this using the " input hook" feature of the interactive
151151prompt. This hook is called by the prompt as it waits for the user
152152to type (even for a fast typist the prompt is mostly waiting for the
153153human to think and move their fingers). Although the details vary
@@ -386,8 +386,8 @@ sure that you are locking in the critical sections.
386386
387387
388388
389- Eventloop integration mechanism
390- ===============================
389+ Event loop integration mechanism
390+ ================================
391391
392392CPython / readline
393393------------------
@@ -404,7 +404,7 @@ run the event loop until a key is pressed on stdin.
404404Matplotlib does not currently do any management of :c:data: `PyOS_InputHook ` due
405405to the wide range of ways that Matplotlib is used. This management is left to
406406downstream libraries -- either user code or the shell. Interactive figures,
407- even with Matplotlib in ' interactive mode' , may not work in the vanilla python
407+ even with Matplotlib in " interactive mode" , may not work in the vanilla python
408408repl if an appropriate :c:data: `PyOS_InputHook ` is not registered.
409409
410410Input hooks, and helpers to install them, are usually included with
@@ -433,9 +433,9 @@ method. The source for the ``prompt_toolkit`` input hooks lives at
433433 then the loop would look something like ::
434434
435435 fds = [...]
436- while True: # Loop
437- inp = select(fds).read() # Read
438- eval(inp) # Evaluate / Print
436+ while True: # Loop
437+ inp = select(fds).read() # Read
438+ eval(inp) # Evaluate / Print
439439
440440 .. [#f2 ] Or you can `write your own
441441 <https://www.youtube.com/watch?v=ZzfHjytDceU> `__ if you must.
0 commit comments