Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import des modules nécessaires
- import os
- import ctypes
- from PIL import Image
- # Définition des variables
- wallpaperURL = "https://ds.static.rtbf.be/article/image/1920x1080/4/4/9/a95b7d8a3961c97a1353f0d2311c1ad4-1460466396.jpg"
- wallpaper = Image.open(wallpaperURL) # Chemin de l'image de fond d'écran
- # Fonction qui modifie le fond d'écran
- def change_wallpaper(wallpaper):
- ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper, 0)
- # Appel de la fonction qui modifie le fond d'écran
- change_wallpaper(wallpaper)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement