In PyCharm, I use the ctypes library to set my desktop background programmatically (on Windows 10):
ctypes.windll.user32.SystemParametersInfoW(20, 0, "C:/U