fixed depreciated
This commit is contained in:
@@ -19,7 +19,7 @@ cmd = ['xrandr']
|
|||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||||
resolution_string, junk = p.communicate()
|
resolution_string, junk = p.communicate()
|
||||||
p.stdout.close()
|
p.stdout.close()
|
||||||
screen_resolutions = [np.array(screen_res.split('x')).astype(np.int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))]
|
screen_resolutions = [np.array(screen_res.split('x')).astype(int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))]
|
||||||
number_of_screens = len(screen_resolutions)
|
number_of_screens = len(screen_resolutions)
|
||||||
max_width = max(screen_resolutions, key=lambda res: res[0])[0]
|
max_width = max(screen_resolutions, key=lambda res: res[0])[0]
|
||||||
defined_main_window = False
|
defined_main_window = False
|
||||||
|
|||||||
Reference in New Issue
Block a user