Skip to content

Commit 0bb4cf8

Browse files
author
BoboTiG
committed
Remove --debug
1 parent 92a4089 commit 0bb4cf8

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

README.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ You can try the MSS module directly from the console::
1818

1919
python mss.py
2020

21-
Passing the `--debug` argument will make it more verbose.
22-
2321

2422
Instance the good class
2523
=======================
@@ -34,7 +32,8 @@ You can determine automatically which class to use::
3432
'Linux': mss.MSSLinux,
3533
'Windows': mss.MSSWindows
3634
}
37-
mss_class = systems[system()]
35+
mss_class = systems[system()]()
36+
#mss_class.DEBUG = True
3837

3938
Or simply import the good one::
4039

@@ -86,11 +85,15 @@ Screen shot of the monitor 1::
8685
Screen shot of the monitor 1, with callback::
8786

8887
def on_exists(fname):
89-
''' Callback example when we try to overwrite an existing screen shot. '''
88+
''' Callback example when we try to overwrite an existing
89+
screen shot.
90+
'''
9091
from os import rename
91-
newfile = fname + '.old'
92-
print('Renaming "{}" to "{}"'.format(fname, newfile))
93-
rename(fname, newfile)
92+
from os.path import isfile
93+
if isfile(fname):
94+
newfile = fname + '.old'
95+
print('{} -> {}'.format(fname, newfile))
96+
rename(fname, newfile)
9497
return True
9598

9699
for filename in mss.save(screen=1, callback=on_exists):

0 commit comments

Comments
 (0)