How can I change my desktop background with python?
I want to do it in both Windows and Linux.
question from:https://stackoverflow.com/questions/1977694/how-can-i-change-my-desktop-background-with-pythonHow can I change my desktop background with python?
I want to do it in both Windows and Linux.
question from:https://stackoverflow.com/questions/1977694/how-can-i-change-my-desktop-background-with-pythonOn Windows with python2.5 or higher, use ctypes to load user32.dll and call SystemParametersInfo()
with SPI_SETDESKWALLPAPER action.
For example:
import ctypes
SPI_SETDESKWALLPAPER = 20
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, "image.jpg" , 0)