Skip to content

Instantly share code, notes, and snippets.

@abdusco
abdusco / session_event_listener.py
Created November 21, 2018 08:08
Listen to workstation lock and unlock events in Python (tested on W10)
from collections import defaultdict
from enum import Enum
import win32api
import win32con
import win32gui
import win32ts
class SessionEvent(Enum):
ANY = 0
@doctaphred
doctaphred / ntfs-filenames.txt
Last active May 9, 2024 13:27
Invalid characters for Windows filenames
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file :
Use any character in the current code page for a name, including Unicode
characters and characters in the extended character set (128–255), except
for the following:
- The following reserved characters:
< (less than)
> (greater than)