def set_windows_appusermodelid():
 try:
  return windll.shell32.SetCurrentProcessExplicitAppUserModelID('spyder.Spyder')
 except AttributeError:
  return 'SetCurrentProcessExplicitAppUserModelID not found'

def set_windows_appusermodelid ( ) : try : return windll . shell32 . SetCurrentProcessExplicitAppUserModelID ( 'spyder.Spyder' ) except AttributeError : return 'SetCurrentProcessExplicitAppUserModelID not found'
make sure correct icon is used on windows 7 taskbar .