Skip to content

Commit

Permalink
Added ImageShow.register examples
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 21, 2022
1 parent 9e6537d commit 35cdcdc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/PIL/ImageShow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@

def register(viewer, order=1):
"""
The :py:func:`register` function is used to register additional viewers.
The :py:func:`register` function is used to register additional viewers::
from PIL import ImageShow
ImageShow.register(MyViewer()) # MyViewer will be used as a last resort
ImageShow.register(MySecondViewer(), 0) # MySecondViewer will be prioritised
ImageShow.register(ImageShow.XVViewer(), 0) # XVViewer will be prioritised
:param viewer: The viewer to be registered.
:param order:
Expand Down

0 comments on commit 35cdcdc

Please sign in to comment.