-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
257 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ build/ | |
.cache/ | ||
dist/ | ||
*.egg-info/ | ||
.idea/ | ||
MANIFEST* | ||
.DS_Store | ||
*.orig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ bubulle [http://indexerror.net/user/bubulle] | |
Condé 'Eownis' Titouan <[email protected]> <[email protected]> [https://titouan.co] | ||
- MacOS X tester | ||
|
||
David Becker [https://davide.me] and redodo [https://github.com/redodo] | ||
- Mac: Take into account extra black pixels added when screen with is not divisible by 16 | ||
|
||
Jochen 'cycomanic' Schroeder [https://github.com/cycomanic] | ||
- GNU/Linux: use errcheck instead of deprecated restype with callable, for enum_display_monitors() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# coding: utf-8 | ||
""" This is part of the MSS Python's module. | ||
Source: https://github.com/BoboTiG/python-mss | ||
""" | ||
|
||
from mss.exception import ScreenshotError | ||
from mss import mss | ||
|
||
|
||
def main(): | ||
# type: () -> int | ||
""" Example to capture part of the screen. """ | ||
|
||
try: | ||
with mss() as sct: | ||
# The screen part to capture | ||
mon = {'top': 160, 'left': 160, 'width': 160, 'height': 135} | ||
|
||
# Save the picture | ||
output = 'sct-{top}x{left}_{width}x{height}.png'.format(**mon) | ||
sct.to_png(sct.get_pixels(mon), output) | ||
print(output) | ||
|
||
return 0 | ||
except ScreenshotError as ex: | ||
print(ex) | ||
|
||
return 1 | ||
|
||
|
||
if __name__ == '__main__': | ||
exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
''' An ultra fast cross-platform multiple screenshots module in pure python | ||
""" An ultra fast cross-platform multiple screenshots module in pure python | ||
using ctypes. | ||
This module is maintained by Mickaël Schoentgen <[email protected]>. | ||
You can always get the latest version of this module at: | ||
https://github.com/BoboTiG/python-mss | ||
If that URL should fail, try contacting the author. | ||
''' | ||
""" | ||
|
||
from .exception import ScreenshotError | ||
from .factory import mss | ||
|
||
__version__ = '2.0.18' | ||
__version__ = '2.0.22' | ||
__author__ = "Mickaël 'Tiger-222' Schoentgen" | ||
__copyright__ = ''' | ||
Copyright (c) 2013-2016, Mickaël 'Tiger-222' Schoentgen | ||
__copyright__ = """ | ||
Copyright (c) 2013-2017, Mickaël 'Tiger-222' Schoentgen | ||
Permission to use, copy, modify, and distribute this software and its | ||
documentation for any purpose and without fee or royalty is hereby | ||
granted, provided that the above copyright notice appear in all copies | ||
and that both that copyright notice and this permission notice appear | ||
in supporting documentation or portions thereof, including | ||
modifications, that you make. | ||
''' | ||
""" | ||
__all__ = ['ScreenshotError', 'mss'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# coding: utf-8 | ||
""" This is part of the MSS Python's module. | ||
Source: https://github.com/BoboTiG/python-mss | ||
""" | ||
|
||
from __future__ import print_function | ||
|
||
from .factory import mss | ||
|
||
|
||
def main(): | ||
""" Main logic. """ | ||
|
||
with mss() as sct: | ||
for file_name in sct.save(): | ||
print(file_name) | ||
|
||
|
||
if __name__ == '__main__': | ||
exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.