[Tutor] Regedit

Kent Johnson kent_johnson at skillsoft.com
Sun Oct 3 15:05:17 CEST 2004


You might be interested in PyRegistry, it simplifies access to the Windows 
registry. It includes a createKey() method.
http://www.pitroda.net:8000/~jbj1/

Kent

At 04:54 AM 10/3/2004 -0700, Ali Polatel wrote:
>Thanks for the information
>I found this script there
>
>
>HomePage
>
>
>
><http://www.pythonapocrypha.com/Chapter37/HomePage.py>HomePage.py
>
>import win32api
>import win32con
>
>SubKey="SOFTWARE\\Microsoft\\Internet Explorer\\Main"
>StartPageKey=win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER,
>     SubKey,0,win32con.KEY_ALL_ACCESS)
>(OldURL, ValueType)=win32api.RegQueryValueEx(StartPageKey,
>     "Start Page")
>print OldURL
>NewURL="http://www.google.com"
>win32api.RegSetValueEx(StartPageKey,"Start Page",0,
>     win32con.REG_SZ,NewURL)
>win32api.RegCloseKey(StartPageKey)
>
>This changes a value... how to create a new value?
>
>Do you Yahoo!?
>Yahoo! Mail is new and improved - 
><http://us.rd.yahoo.com/mail_us/taglines/new/*http://promotions.yahoo.com/new_mail>Check 
>it out!
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list