From f4526a513d210dea47d5d3fdb53351b5a014d7d7 Mon Sep 17 00:00:00 2001 From: simleek Date: Tue, 7 Apr 2020 22:19:06 -0700 Subject: [PATCH] Fixed documentation. --- displayarray/frame/frame_updater.py | 12 ++++++------ displayarray/window/subscriber_windows.py | 1 + docs/docsrc/display.rst | 1 + docs/docsrc/frame.rst | 6 ------ 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/displayarray/frame/frame_updater.py b/displayarray/frame/frame_updater.py index 90a9479..52aa0a8 100644 --- a/displayarray/frame/frame_updater.py +++ b/displayarray/frame/frame_updater.py @@ -132,14 +132,14 @@ class FrameUpdater(threading.Thread): """ Read back all updates from the requested videos. - Example usage: + Examp#le usage: - .. code-block:: python + .. co#de-block:: python - >>> from examples.videos import test_video - >>> f = 0 - >>> for f, r in enumerate(read_updates(test_video, end_callback=lambda :f==2)): - ... print(f"Frame:{f}. Array:{r}") + >>#> from examples.videos import test_video + >>#> f = 0 + >>#> for f, r in enumerate(read_updates(test_video, end_callback=lambda :f==2)): + ..#. print(f"Frame:{f}. Array:{r}") """ from displayarray.window import SubscriberWindows diff --git a/displayarray/window/subscriber_windows.py b/displayarray/window/subscriber_windows.py index e345f13..1ba2735 100644 --- a/displayarray/window/subscriber_windows.py +++ b/displayarray/window/subscriber_windows.py @@ -349,4 +349,5 @@ def breakpoint_display(*args, **kwargs): def read_updates(*args, **kwargs): + """Read back all frame updates and yield a list of frames. List is empty if no frames were read.""" return display(*args, **kwargs, silent=True) diff --git a/docs/docsrc/display.rst b/docs/docsrc/display.rst index 1a324d2..e9e6103 100644 --- a/docs/docsrc/display.rst +++ b/docs/docsrc/display.rst @@ -4,6 +4,7 @@ displayarray.display .. autofunction:: display .. autofunction:: breakpoint_display +.. autofunction:: read_updates Windows ------- diff --git a/docs/docsrc/frame.rst b/docs/docsrc/frame.rst index 8d8412f..744222a 100644 --- a/docs/docsrc/frame.rst +++ b/docs/docsrc/frame.rst @@ -1,12 +1,6 @@ displayarray.frame =================================== -Read Updates ------------- -.. currentmodule:: displayarray - -.. autofunction:: read_updates - Frame Passing ------------- .. currentmodule:: displayarray.frame