--- utils.py 2010-05-07 12:42:32.000000000 +0200 *************** *** 155,161 **** pipe = os.popen('xrandr') data = pipe.read() pipe.close() ! matches = re.search('current (\d+) x (\d+)', data) return matches.group(1) + 'x' + matches.group(2)
def set_resolution(resolution): --- 155,161 ---- pipe = os.popen('xrandr') data = pipe.read() pipe.close() ! matches = re.search('\*\s*\d+\s+(\d+) x (\d+)', data) return matches.group(1) + 'x' + matches.group(2)
def set_resolution(resolution):
--- utils.py 2010-05-07 12:42:32.000000000 +0200
***************
*** 155,161 ****
pipe = os.popen('xrandr')
data = pipe.read()
pipe.close()
! matches = re.search('current (\d+) x (\d+)', data)
return matches.group(1) + 'x' + matches.group(2)
def set_resolution( resolution) : '\*\s*\ d+\s+(\ d+) x (\d+)', data)
--- 155,161 ----
pipe = os.popen('xrandr')
data = pipe.read()
pipe.close()
! matches = re.search(
return matches.group(1) + 'x' + matches.group(2)
def set_resolution( resolution) :