home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.6)
-
- from ctypes import c_int, byref, WinError, windll
-
- try:
- SHQueryUserNotificationState = windll.shell32.SHQueryUserNotificationState
- except AttributeError:
- enabled = False
-
- enabled = True
- last_state = False
-
- def get_accepts_notifications():
- global last_state
- state = c_int()
- if SHQueryUserNotificationState(byref(state)):
- raise WinError()
- SHQueryUserNotificationState(byref(state))
- val = state.value
- last_state = val
- return val not in (1, 2, 3, 4)
-
- if __name__ == '__main__':
- print get_accepts_notifications()
-
-