[python-win32] [Python-Win32] error on shell.SHChangeNotify

TK Soh teekaysoh at gmail.com
Mon May 21 19:14:43 CEST 2007


I am trying to use SHChangeNotify to refresh the icon on the explorer
windows in the following script, but got an error:
----------------------------------
import sys
from win32com.shell import shell, shellcon

def notify(f):
    shell.SHChangeNotify(shellcon.SHCNE_UPDATEITEM,
                         shellcon.SHCNF_PATH | shellcon.SHCNF_FLUSHNOWAIT,
                         f,
                         None)

for f in sys.argv[1:]:
    notify(f)
----------------------------------

Traceback (most recent call last):
  File "notify.py", line 11, in ?
    notify(f)
  File "notify.py", line 8, in notify
    None)
TypeError: Only sequences (but not strings) are valid ITEMIDLIST
objects (got str).


Does anyone has any idea what I did wrong? I can't find much info on
google. Thanks.


More information about the Python-win32 mailing list