[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: System Independent Wallpaper Changer
From: "Terrance N. Phillip" <mediocre_person () hotmail ! com>
Date: 2005-07-06 0:12:37
Message-ID: 42cb220c$1_5 () alt ! athenanews ! com
[Download RAW message or body]
This is what I've got... the code should work on a typical Windows
system, I think...
============================================
import os
import random
import time
# I'm not sure what to expect for Win98, WinME, etc. I've
# only tried it with xp...
if os.name in ['nt', 'win98', 'me']:
osWindows = True
import ctypes
import win32con
import Image
pth = 'c:/path/to/wallpapers'
else:
osWindows = False
pth = '~/path/to/wallpapers'
picfiles = os.listdir(pth)
while True:
jpg = random.choice(picfiles)
if os_type = 'W':
bmp = 'c:/wallpaper.bmp'
Image.open(pth+jpg).save(bmp)
cs = ctypes.c_buffer(bmp)
ok =
ctypes.windll.user32.SystemParametersInfoA(win32con.SPI_SETDESKWALLPAPER,0,cs,0)
else:
pass
' set kde wallpaper to jpg <------------- *** ---
time.sleep(60)
=================================================
I've done some searching, and can't seem to find a programatic way of
getting *** that to happen.
Thanks for any advice.
Nick.
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic