I am sure purists may not accept this, but I have been using the fact that Windows uses drive letters:
from pathlib import Path if Path().resolve().drive == '': print('Not Windows')