Trying to write a python application that downloads images from an RSS feed, and makes a composite background. How do I get the current desktop resolution on Mac OS X (leopard?)
I was having a hard time getting any of this to work so I looked around and put something together that seems to work. I am kinda new at coding so please excuse any errors. If you have any thoughts please comment.
results = str(subprocess.Popen(['system_profiler SPDisplaysDataType'],stdout=subprocess.PIPE, shell=True).communicate()[0])
res = re.search('Resolution: \d* x \d*', results).group(0).split(' ')
width, height = res[1], res[3]
return width, height