Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 775f19d

Browse files
committed
Doc: fix WARNING: Could not parse literal_block as "python". highlighting skipped
1 parent e9cdb66 commit 775f19d

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

docs/source/examples.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,37 +49,41 @@ Screenshot of the monitor 1 with callback::
4949
Into the Python's console
5050
-------------------------
5151

52-
::
52+
Initialisation::
5353

5454
>>> from mss import mss
5555
>>> sct = mss()
5656

57-
# Retrieve monitors informations
57+
Retrieve monitors informations::
58+
5859
>>> displays = sct.enum_display_monitors()
5960
>>> displays
6061
[{'width': 1920, 'top': 0, 'height': 1080, 'left': 0}, {'width': 1920, 'top': 0, 'height': 1080, 'left': 0}]
61-
# You can access monitors list via `monitors`:
62+
63+
You can access monitors list via ``monitors`` too::
64+
6265
>>> displays is sct.monitors
6366
True
6467

65-
# Retrieve pixels from the first monitor
68+
Retrieve pixels from the first monitor::
69+
6670
>>> pixels = sct.get_pixels(displays[1])
6771
>>> type(pixels)
6872
<class 'bytes'>
69-
# You can access pixels data via `image`:
73+
74+
You can access pixels data via ``image`` too::
75+
7076
>>> pixels is sct.image
7177
True
7278

73-
# Save pixels to a PNG file: option 1
79+
Save pixels to a PNG file, option 1::
80+
7481
>>> files = sct.save(mon=1)
7582
>>> next(files)
7683
'monitor-1.png'
77-
>>> next(files)
78-
Traceback (most recent call last):
79-
File "<stdin>", line 1, in <module>
80-
StopIteration
8184

82-
# Save pixels to a PNG file: option 2
85+
Save pixels to a PNG file, option 2::
86+
8387
>>> sct.to_png(data=pixels, output='monitor-1.png')
8488

8589

0 commit comments

Comments
 (0)