newharvar 0 Newbie Poster

there is a good tool for python programming called ulipad,you can google it,it's powerfull and usefull

newharvar 0 Newbie Poster

yes,I know pywin32,and write a simple software to change desktop automaticly,you can download from http://code.google.com/p/seasoudesktop/ it's default language,if need i can translate into enlish for you.
when a set the desktop ,there is no method to release the memory,I checked c++ 's relative interface,it has a method call relase(),so my software takes so many memory,I google all releative resource,but get no usefull message,can anybody help me ?

newharvar 0 Newbie Poster

hi,everybody
I am study ctypes,and got a big trouble,I googled lots a pages but get no usefull info.
i want to know how to get the interface from winxp by using ctypes,
for example:
I want to use ActiveDesktop 's interface by using ctypes,but i don't know how to do,can anybody help me?
thanks alot~

newharvar 0 Newbie Poster

i know this can do
import ctypes
import Image
# -*- coding: cp936 -*-

STOREDIR = './img'

def setWallpaperFromBMP(imagepath):
SPI_SETDESKWALLPAPER = 20 # According to http://support.microsoft.com/default.aspx?scid=97142
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, imagepath , 0) #SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE

def setWallPaper(imagePath):
"""Given a path to an image, convert it to bmp and set it as wallpaper"""
bmpImage = Image.open(imagePath)
newPath = STOREDIR + 'mywallpaper.bmp'
bmpImage.save(newPath, "BMP")
setWallpaperFromBMP(newPath)

filename="./girl6.jpg"
setWallPaper(filename)

but it seems not so good,somebody who know how to get the point of iactivedesktop?

newharvar 0 Newbie Poster

I want to change my desktop by writing a python program,can somebody help me ?thanks so much!

newharvar 0 Newbie Poster

import httplib
conn = httplib.HTTPConnection("<A href="http://www.python.org",80">http://www.python.org",80)
conn.request("GET", "/index.php")
r1 = conn.getresponse()
print r1.status, r1.reason

conn.close()


where I test it,it show errors as below:
Traceback (most recent call last):
File "E:\Program\demo\src\testhttp.py", line 6, in <module>
conn.request("GET", "/index.php")
File "C:\Python25\Lib\httplib.py", line 862, in request
self._send_request(method, url, body, headers)
File "C:\Python25\Lib\httplib.py", line 885, in _send_request
self.endheaders()
File "C:\Python25\Lib\httplib.py", line 856, in endheaders
self._send_output()
File "C:\Python25\Lib\httplib.py", line 728, in _send_output
self.send(msg)
File "C:\Python25\Lib\httplib.py", line 695, in send
self.connect()
File "C:\Python25\Lib\httplib.py", line 663, in connect
socket.SOCK_STREAM):
socket.gaierror: (11001, 'getaddrinfo failed')


can any body help me ?