I have a little PyObjC script to change desktop images to a particular file (which is fetched from flickr). It sets a different image for each screen, should you have multiple. This worked fine in Snow Leopard, but in Lion you can set background images for individual desktops (formally Spaces), whereas in Snow Leopard all Spaces shared the same background.
I'm currently using setDesktopImageURL:forScreen:options:error:
on [NSWorkspace sharedWorkspace]
, but that only sets the image on the current space/desktop.
Any ideas how I might iterate over the desktops and set images on each? Many thanks!